public class AlignmentContentArea extends TICComponent
This component is used a child component of AlignmentArea
and in contrast to AlignmentArea
does not contain a scroll container, but acts as the scrolled component. Application developers will not
need to create instances of this class directly but should use AlignmentArea
.
AlignmentArea
,
AlignmentLabelArea
DISPATCHER_MAP, repaintRequested
Constructor and Description |
---|
AlignmentContentArea(AlignmentArea owner)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
columnByPaintX(double x)
Returns the column containing the specified x coordinate.
|
java.util.Map<javax.swing.KeyStroke,javax.swing.Action> |
getActionMap() |
AlignmentSubArea |
getAreaByPaintY(double y)
Returns the child component containing the specified y-coordinate.
|
AlignmentSubAreaInfo |
getAreaInfoByPaintY(double y)
Returns the child component containing the specified y-coordinate and its top most y-coordinate in
an instance of
AlignmentSubAreaInfo . |
java.awt.geom.Rectangle2D |
getCursorRectangle()
Returns the rectangle in the paint coordinate system of scrolled area displaying the sequences, that contains
all cells currently occupied by the alignment cursor.
|
AlignmentArea |
getOwner() |
SequenceArea |
getSequenceAreaByID(java.lang.String sequenceID)
Returns the
SequenceArea inside this area that displays the sequence with the specified ID. |
SequenceArea |
getSequenceAreaByRow(int row)
Returns the
SequenceArea inside this area that displays the sequence in the specified row. |
protected SequenceAreaMap |
getSequenceAreaMap() |
java.awt.Dimension |
getSize() |
protected java.lang.String |
getSwingComponentClassName(java.lang.Object... parameters) |
protected java.lang.String |
getSWTComponentClassName(java.lang.Object... parameters) |
ToolkitSpecificAlignmentContentArea |
getToolkitComponent() |
void |
paint(TICPaintEvent event)
Paints the contents (sequences and data areas) of an alignment, if this instance is set to use direct painting.
|
double |
paintXByColumn(int column)
Returns the left most x-coordinate of the area the specified column is painted in relative to the
component on which the sequences are painted.
|
double |
paintYByRow(int row)
Returns the top most y-coordinate of the area the specified row is painted in relative to the
component on which the sequences are painted.
|
int |
rowByPaintY(double y)
Returns the row index of the sequence displayed at the specified y coordinate considering the current order
of sequences.
|
AlignmentSubAreaIterator |
subAreaIterator() |
void |
updateSubelements() |
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, dispatchEvent, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentConstructorParameters, getSWTComponentConstructorParameters, hasDefinedSize, hasToolkitComponent, isUpdateOngoing, removeKeyListener, removeMouseListener, removeWheelMouseListener, repaint, setToolkitComponent, setUpdateOngoing
public AlignmentContentArea(AlignmentArea owner)
If code
is part of a MultipleAlignmentsContainer
the shared edit settings of this container
will automatically be used by the returned instance.
owner
- the alignment area component that will be containing the return instancepublic AlignmentArea getOwner()
public AlignmentSubAreaIterator subAreaIterator()
protected SequenceAreaMap getSequenceAreaMap()
public SequenceArea getSequenceAreaByID(java.lang.String sequenceID)
SequenceArea
inside this area that displays the sequence with the specified ID.sequenceID
- the ID of the sequence displayed in the returned areanull
if no sequence with the specified ID is displayed in this areapublic SequenceArea getSequenceAreaByRow(int row)
SequenceArea
inside this area that displays the sequence in the specified row.row
- the row of the sequence displayed in the returned areajava.lang.IndexOutOfBoundsException
- if the specified row is below 0 or greater or equal to number of sequencespublic java.util.Map<javax.swing.KeyStroke,javax.swing.Action> getActionMap()
public void updateSubelements()
public java.awt.geom.Rectangle2D getCursorRectangle()
If the last row has associated data areas, the height of these areas is also included in the rectangle.
public java.awt.Dimension getSize()
getSize
in class TICComponent
public void paint(TICPaintEvent event)
paint
in class TICComponent
TICComponent.paint(info.bioinfweb.tic.TICPaintEvent)
public ToolkitSpecificAlignmentContentArea getToolkitComponent()
getToolkitComponent
in class TICComponent
protected java.lang.String getSwingComponentClassName(java.lang.Object... parameters)
getSwingComponentClassName
in class TICComponent
protected java.lang.String getSWTComponentClassName(java.lang.Object... parameters)
getSWTComponentClassName
in class TICComponent
public int columnByPaintX(double x)
x
- the paint coordinatepublic double paintXByColumn(int column)
column
- the column painted at the returned x-positionpublic AlignmentSubArea getAreaByPaintY(double y)
y
- the y-coordinate relative to this alignment content areanull
if y
is
below 0 or higher than this instancepublic AlignmentSubAreaInfo getAreaInfoByPaintY(double y)
AlignmentSubAreaInfo
.y
- the y-coordinate relative to this alignment content areanull
if y
is below 0 or higher than this instancepublic int rowByPaintY(double y)
y
- the y coordinate relative to the alignment part area containing the sequence areaspublic double paintYByRow(int row)
If an index lower than zero or greater than the highest index is specified the y-coordinate of the first or the last sequence is returned accordingly.
row
- the row painted at the returned x-position