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.
AlignmentArea
,
AlignmentLabelArea
Constructor and Description |
---|
AlignmentContentArea(AlignmentArea owner)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
int |
alignmentPartY(SequenceArea sequenceArea,
int relativeY)
Calculates the y coordinate relative to the alignment content area, which contains the specified sequence area.
|
int |
columnByPaintX(int x)
Returns the column containing the specified x coordinate.
|
Map<KeyStroke,Action> |
getActionMap() |
Rectangle |
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() |
Dimension |
getSize() |
protected String |
getSwingComponentClassName() |
protected String |
getSWTComponentClassName() |
ToolkitSpecificAlignmentContentArea |
getToolkitComponent() |
void |
paint(TICPaintEvent event) |
int |
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.
|
int |
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(int y)
Returns the row index of the sequence displayed at the specified y coordinate considering the current order
of sequences.
|
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, hasToolkitComponent, removeKeyListener, removeMouseListener, removeWheelMouseListener, repaint, setToolkitComponent
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 Map<KeyStroke,Action> getActionMap()
public Rectangle getCursorRectangle()
If the last row has associated data areas, the height of these areas is also included in the rectangle.
public Dimension getSize()
getSize
in class TICComponent
public void paint(TICPaintEvent event)
paint
in class TICComponent
protected String getSwingComponentClassName()
getSwingComponentClassName
in class TICComponent
protected String getSWTComponentClassName()
getSWTComponentClassName
in class TICComponent
public ToolkitSpecificAlignmentContentArea getToolkitComponent()
getToolkitComponent
in class TICComponent
public int columnByPaintX(int x)
x
- the paint coordinatepublic int paintXByColumn(int column)
column
- the column painted at the returned x-positionpublic int rowByPaintY(int y)
y
- the y coordinate relative to the alignment part area containing the sequence areaspublic int 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-positionpublic int alignmentPartY(SequenceArea sequenceArea, int relativeY)
sequenceArea
- the sequence area where relativeY
belongs torelativeY
- the y coordinate relative to sequenceArea
ToolkitSpecificAlignmentArea
IllegalStateException
- if neither or Swing or a SWT component has been created for the specified sequence
area before the call of this method