public class CharSetArea extends DataArea
Modifier and Type | Field and Description |
---|---|
static double |
BORDER_FRACTION |
Constructor and Description |
---|
CharSetArea(AlignmentContentArea owner,
AlignmentArea labeledAlignmentArea)
Creates a new instance of this class with an empty data model.
|
CharSetArea(AlignmentContentArea owner,
AlignmentArea labeledAlignmentArea,
CharSetDataModel model)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
<T,U> void |
afterProviderChanged(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.
|
protected AlignmentLabelSubArea |
createLabelSubArea(AlignmentLabelArea owner)
This method can be overwritten to provide a specific implementation for labeling the implementing data area.
|
int |
getHeight()
Returns the height in pixels considering the current zoom factor this component needs.
|
CharSetDataModel |
getModel()
Returns the underlying model providing character set data.
|
void |
paint(TICPaintEvent event) |
Set<DataAreaListType> |
validLocations()
This data area is allowed to attached at the top and bottom of an alignment area as well as to each sequence.
|
getLabeledAlignmentArea, getLabeledAlignmentModel, getLengthAfterEnd, getLengthBeforeStart, getList, getSize, isVisible, setList, setVisible
getLabelSubArea, getOwner
addKeyListener, addMouseListener, addMouseWheelListener, assignSize, getCurrentToolkit, getKeyListenersSet, getMouseListenersSet, getMouseWheelListenersSet, getSwingComponentClassName, getSWTComponentClassName, getToolkitComponent, hasToolkitComponent, removeKeyListener, removeMouseListener, removeWheelMouseListener, repaint, setToolkitComponent
public static final double BORDER_FRACTION
public CharSetArea(AlignmentContentArea owner, AlignmentArea labeledAlignmentArea, CharSetDataModel model)
owner
- the alignment area that will be containing the returned data area instancelabeledAlignmentArea
- the alignment area that shall determine the token widths considered when painting
the character sets (Should only be different from owner.getOwner()
if the new instance will be
placed in a different alignment area than the sequence data in a scenario with a
MultipleAlignmentsContainer
.)model
- the model providing the character set datapublic CharSetArea(AlignmentContentArea owner, AlignmentArea labeledAlignmentArea)
owner
- the alignment area that will be containing the returned data area instancelabeledAlignmentArea
- the alignment area that shall determine the token widths considered when painting
the character sets (Should only be different from owner.getOwner()
if the new instance will be
placed in a different alignment area than the sequence data in a scenario with a
MultipleAlignmentsContainer
.)public CharSetDataModel getModel()
public int getHeight()
DataArea
public void paint(TICPaintEvent event)
paint
in class TICComponent
public Set<DataAreaListType> validLocations()
validLocations
in class DataArea
DataArea.validLocations()
public <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 afterProviderChanged(AlignmentModel<T> previous, AlignmentModel<U> current)
AlignmentModelChangeListener
AlignmentModel
.
This might e.g. happen, if the data provider of an AlignmentArea
was changed.
previous
- the data provider this listener was attached to before the event happenedcurrent
- the new data provider this listener is attached to nowprotected AlignmentLabelSubArea createLabelSubArea(AlignmentLabelArea owner)
AlignmentSubArea
This default implementation always returns an instance of DefaultLabelSubArea
.
createLabelSubArea
in class AlignmentSubArea
owner
- the alignment label area that can be set as the owner of the returned component.DefaultLabelSubArea
linked to this instance