public class SequenceArea extends AlignmentSubArea
AlignmentArea that displays one sequence of the alignment.DISPATCHER_MAP, repaintRequested| Constructor and Description |
|---|
SequenceArea(AlignmentContentArea owner,
java.lang.String sequenceID)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
protected AlignmentLabelSubArea |
createLabelSubArea(AlignmentLabelArea owner)
This method can be overwritten to provide a specific implementation for labeling the implementing data area.
|
double |
getHeight()
Returns the height in pixels considering the current zoom factor this component needs.
|
java.lang.String |
getSequenceID()
Returns the unique identifier of the the sequence displayed by this area.
|
void |
paintPart(AlignmentPaintEvent event)
Implementations of this method perform the painting of a part of the component.
|
getLabelSubArea, getOwner, getSize, paint, repaintaddKeyListener, addMouseListener, addMouseWheelListener, assignSize, dispatchEvent, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentClassName, getSwingComponentConstructorParameters, getSWTComponentClassName, getSWTComponentConstructorParameters, getToolkitComponent, hasDefinedSize, hasToolkitComponent, isUpdateOngoing, removeKeyListener, removeMouseListener, removeWheelMouseListener, setToolkitComponent, setUpdateOngoingpublic SequenceArea(AlignmentContentArea owner, java.lang.String sequenceID)
owner - the alignment area that will contain this instancesequenceID - the unique identifier of the sequence that will be displayed in this areapublic java.lang.String getSequenceID()
AlignmentModelpublic void paintPart(AlignmentPaintEvent event)
AlignmentSubAreaAlignmentArea 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 ints at any time to avoid overflows, but only use
double (or possibly long if necessary).
paintPart in class AlignmentSubAreaevent - the paint event providing information on the area to be painted, the graphics context
and tool methods.public double getHeight()
AlignmentSubAreagetHeight in class AlignmentSubAreadouble value > 0protected AlignmentLabelSubArea createLabelSubArea(AlignmentLabelArea owner)
AlignmentSubArea
This default implementation always returns an instance of DefaultLabelSubArea.
createLabelSubArea in class AlignmentSubAreaowner - the alignment label area that can be set as the owner of the returned component.DefaultLabelSubArea linked to this instance