public class LabelDataArea extends DataArea
DISPATCHER_MAP, repaintRequested
Constructor and Description |
---|
LabelDataArea(AlignmentContentArea owner,
AlignmentArea labeledArea) |
LabelDataArea(AlignmentContentArea owner,
AlignmentArea labeledArea,
java.lang.String text) |
Modifier and Type | Method and Description |
---|---|
<T,U> void |
afterModelChanged(AlignmentModel<T> previous,
AlignmentModel<U> current)
Called if this listener was moved to another instance of
AlignmentModel . |
<T> void |
afterSequenceChange(SequenceChangeEvent<T> e)
Called after a sequence has been inserted, removed or replaced.
|
<T> void |
afterSequenceRenamed(SequenceRenamedEvent<T> e)
Called after a sequence was renamed.
|
<T> void |
afterTokenChange(TokenChangeEvent<T> e)
Called after a single token or a set of tokens has been inserted, removed or replaced.
|
java.awt.Color |
getBackgroundColor() |
java.awt.Font |
getFont() |
double |
getHeight()
Returns the height in pixels considering the current zoom factor this component needs.
|
java.lang.String |
getText() |
java.awt.Color |
getTextColor() |
void |
paintPart(AlignmentPaintEvent e)
Implementations of this method perform the painting of a part of the component.
|
void |
setBackgroundColor(java.awt.Color backgroundColor) |
void |
setFont(java.awt.Font font) |
void |
setText(java.lang.String text) |
void |
setTextColor(java.awt.Color textColor) |
java.util.Set<DataAreaListType> |
validLocations()
The result should enumerate all valid locations where the implementing data area is allowed to be located.
|
getLabeledAlignmentArea, getLabeledAlignmentModel, getLengthAfterEnd, getLengthBeforeStart, getList, isVisible, setList, setVisible
createLabelSubArea, getLabelSubArea, getOwner, getSize, paint, repaint
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, dispatchEvent, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentClassName, getSwingComponentConstructorParameters, getSWTComponentClassName, getSWTComponentConstructorParameters, getToolkitComponent, hasDefinedSize, hasToolkitComponent, isUpdateOngoing, removeKeyListener, removeMouseListener, removeWheelMouseListener, setToolkitComponent, setUpdateOngoing
public LabelDataArea(AlignmentContentArea owner, AlignmentArea labeledArea)
public LabelDataArea(AlignmentContentArea owner, AlignmentArea labeledArea, java.lang.String text)
public java.lang.String getText()
public void setText(java.lang.String text)
public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public java.awt.Color getTextColor()
public void setTextColor(java.awt.Color textColor)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color backgroundColor)
public java.util.Set<DataAreaListType> validLocations()
DataArea
An implementation for a data area could be located everywhere could look like this:
return EnumSet.of(DataAreaListType.TOP, DataAreaListType.BOTTOM, DataAreaListType.SEQUENCE);
validLocations
in class DataArea
public void paintPart(AlignmentPaintEvent e)
AlignmentSubArea
AlignmentArea
is set to contain no subcomponents but to paint its contents directly.
This default implementation always throws an UnsupportedOperationException
. Note that
therefore inherited classes must either overwrite this method or #createComponent()
in
order to return an instance there that does not delegate to this method.
Note that the aim of this method is to allow painting very wide components, which may have a width
larger than Integer.MAX_VALUE
. Therefore painting coordinates are stored as double
values (using Graphics2D
and Rectangle2D.Double
). Implementations should not
calculate pixel coordinates as int
s at any time to avoid overflows, but only use
double
(or possibly long
if necessary).
paintPart
in class AlignmentSubArea
e
- the paint event providing information on the area to be painted, the graphics context
and tool methods.public double getHeight()
AlignmentSubArea
getHeight
in class AlignmentSubArea
double
value > 0public <T> void afterSequenceChange(SequenceChangeEvent<T> e)
AlignmentModelChangeListener
e
- the event object containing information on the changepublic <T> void afterSequenceRenamed(SequenceRenamedEvent<T> e)
AlignmentModelChangeListener
e
- the event object containing information on the changepublic <T> void afterTokenChange(TokenChangeEvent<T> e)
AlignmentModelChangeListener
e
- the event object containing information on the changepublic <T,U> void afterModelChanged(AlignmentModel<T> previous, AlignmentModel<U> current)
AlignmentModelChangeListener
AlignmentModel
.
This happens if the alignment model of an AlignmentArea
was changed.
previous
- the alignment model this listener was attached to before the event happenedcurrent
- the new alignment model this listener is attached to now