public abstract class AlignmentSubArea extends TICComponent
AlignmentContentArea should inherit from this class.
The method #paintPart(int, Graphics2D, Rectangle) is responsible for drawing this component
and is called by the TIC method paint(TICPaintEvent) internally.DISPATCHER_MAP, repaintRequested| Constructor and Description |
|---|
AlignmentSubArea(AlignmentContentArea owner)
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.
|
abstract double |
getHeight()
Returns the height in pixels considering the current zoom factor this component needs.
|
AlignmentLabelSubArea |
getLabelSubArea()
Returns the GUI component that displays the row label for this part of the alignment.
|
AlignmentContentArea |
getOwner()
Returns the alignment content area that displays this data area.
|
java.awt.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. |
void |
paint(TICPaintEvent event)
This method delegates to
paintPart(AlignmentPaintEvent). |
void |
paintPart(AlignmentPaintEvent event)
Implementations of this method perform the painting of a part of the component.
|
void |
repaint() |
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, dispatchEvent, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentClassName, getSwingComponentConstructorParameters, getSWTComponentClassName, getSWTComponentConstructorParameters, getToolkitComponent, hasDefinedSize, hasToolkitComponent, isUpdateOngoing, removeKeyListener, removeMouseListener, removeWheelMouseListener, setToolkitComponent, setUpdateOngoingpublic AlignmentSubArea(AlignmentContentArea owner)
owner - the alignment content area that will contain this instancepublic AlignmentContentArea getOwner()
public void paint(TICPaintEvent event)
paintPart(AlignmentPaintEvent). Classes inheriting from this class should
overwrite paintPart(AlignmentPaintEvent) instead of this method.paint in class TICComponentevent - the paint event providing the graphics context and information on which part of the
component should be repaintedTICComponent.paint(info.bioinfweb.tic.TICPaintEvent)public void repaint()
repaint in class TICComponentpublic java.awt.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 TICComponentprotected AlignmentLabelSubArea createLabelSubArea(AlignmentLabelArea owner)
This default implementation always returns an instance of DefaultLabelSubArea.
owner - the alignment label area that can be set as the owner of the returned component.DefaultLabelSubArea linked to this instancepublic AlignmentLabelSubArea getLabelSubArea()
public abstract double getHeight()
double value > 0public void paintPart(AlignmentPaintEvent event)
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 ints at any time to avoid overflows, but only use
double (or possibly long if necessary).
event - the paint event providing information on the area to be painted, the graphics context
and tool methods.