public abstract class DataArea extends AlignmentSubArea implements AlignmentModelChangeListener
AlignmentArea
must be inherited from this class.Constructor and Description |
---|
DataArea(AlignmentContentArea owner,
AlignmentArea labeledArea)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
getHeight()
Returns the height in pixels considering the current zoom factor this component needs.
|
AlignmentArea |
getLabeledAlignmentArea()
Returns the alignment area that is labeled by this data area.
|
AlignmentModel<?> |
getLabeledAlignmentModel()
Convenience method that returns the alignment model of the labeled alignment area.
|
int |
getLengthAfterEnd()
Returns the length in pixels considering the current zoom factor this component needs to display
data right of the last alignment column.
|
int |
getLengthBeforeStart()
Returns the length in pixels considering the current zoom factor this component needs to display
data left of the first alignment column.
|
DataAreaList |
getList()
Returns the list this data area is contained in.
|
Dimension |
getSize()
Returns the size of the component depending on the return values of
#getLength() , getHeight()
and the maximum length before the first alignment position in the associated alignment area. |
boolean |
isVisible()
Indicates whether this data area is currently faded in or out in the containing alignment area.
|
void |
setList(DataAreaList list)
Updates the list this element is contained in.
|
boolean |
setVisible(boolean visible)
Fades this data area in or out and lets the containing alignment area repaint, if necessary.
|
abstract Set<DataAreaListType> |
validLocations()
The result should enumerate all valid locations where the implementing data area is allowed to be located.
|
createLabelSubArea, getLabelSubArea, getOwner
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentClassName, getSWTComponentClassName, getToolkitComponent, hasToolkitComponent, paint, removeKeyListener, removeMouseListener, removeWheelMouseListener, repaint, setToolkitComponent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterProviderChanged, afterSequenceChange, afterSequenceRenamed, afterTokenChange
public DataArea(AlignmentContentArea owner, AlignmentArea labeledArea)
owner
- the alignment area that will contain this instancelabeledArea
- the alignment area displays the sequence which is labeled by the new instance
(If null
is specified here, the parent alignment area of owner
will be assumed.)public AlignmentArea getLabeledAlignmentArea()
Note that inside a MultipleAlignmentsContainer
a data area could be located in a different
alignment area than the related alignment data. Therefore the returned instance is not necessarily
identical with the instance returned by getOwner().getOwner()
.
getLabeledAlignmentModel()
public AlignmentModel<?> getLabeledAlignmentModel()
getLabeledAlignmentArea()
public DataAreaList getList()
public void setList(DataAreaList list)
list
- the list that contains this elementpublic boolean isVisible()
It does not state whether this data area is contained a area of the alignment area that is currently visible on the screen.
true
if this data area is faded in, false
if it is faded outpublic boolean setVisible(boolean visible)
visible
- true
if the state of this element was changed, false
otherwisepublic abstract Set<DataAreaListType> validLocations()
An implementation for a data area could be located everywhere could look like this:
return EnumSet.of(DataAreaListType.TOP, DataAreaListType.BOTTOM, DataAreaListType.SEQUENCE);
public int getLengthBeforeStart()
Overwrite this method if your component displays additional information left of the alignment.
public int getLengthAfterEnd()
Overwrite this method if your component displays additional information right of the alignment.
public abstract int getHeight()
public Dimension getSize()
#getLength()
, getHeight()
and the maximum length before the first alignment position in the associated alignment area. (That means this
method might return a different dimension depending on the AlignmentArea
is it contained in.)getSize
in class TICComponent