public abstract class AbstractBioPolymerTokenPainter extends SingleColorTokenPainter
DEFAULT_HEIGHT, DEFAULT_WIDTH, FONT_SIZE_FACTOR, MIN_FONT_SIZE
Constructor and Description |
---|
AbstractBioPolymerTokenPainter() |
Modifier and Type | Method and Description |
---|---|
protected abstract char[] |
calculateConstituents(java.lang.String tokenRepresentation)
To be implemented by inherited classes to determine the non-ambiguous tokens that could be represented
by the specified ambiguity code.
|
protected void |
doPaintToken(AlignmentArea alignmentArea,
java.lang.String sequenceID,
int columnIndex,
java.lang.Object token,
java.lang.String tokenRepresentation,
java.awt.Graphics2D g,
java.awt.geom.Rectangle2D paintArea,
java.awt.Color selectionColor)
Method to be implemented by inherited classes performing the actual paint operation.
|
protected abstract boolean |
isAmbiguity(java.lang.String tokenRepresentation)
To be implemented by inherited classes to determine whether the specified token representation
is an ambiguity code.
|
backgroundColorByRepresentation, calculateFont, calculatePreferredWidth, equals, getBackgroundColorMap, getColor, getDefaultBackgroundColor, getFontColor, getFontName, getFontStyle, getPreferredHeight, getPreferredWidth, hashCode, paintText, setDefaultBackgroundColor, setFontColor, setFontName, setFontStyle
paintToken
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
paintToken
public AbstractBioPolymerTokenPainter()
protected abstract boolean isAmbiguity(java.lang.String tokenRepresentation)
tokenRepresentation
- the token representationtrue
if the token is ambiguous and shall have a background with multiple colors,
false
otherwiseprotected abstract char[] calculateConstituents(java.lang.String tokenRepresentation)
tokenRepresentation
- the ambiguous token representationprotected void doPaintToken(AlignmentArea alignmentArea, java.lang.String sequenceID, int columnIndex, java.lang.Object token, java.lang.String tokenRepresentation, java.awt.Graphics2D g, java.awt.geom.Rectangle2D paintArea, java.awt.Color selectionColor)
AbstractTokenPainter
TokenPainter
by an additional parameter providing the string representation of
the token.
- * @param alignmentArea the alignment area displaying the token to be painteddoPaintToken
in class SingleColorTokenPainter
sequenceID
- the ID of the sequence containing the token to be paintedcolumnIndex
- the index of the alignment column containing the token to be paintedtoken
- the token to be paintedtokenRepresentation
- the string representation of token
determined from the token set of
alignmentModel
g
- the graphics context to paint topaintArea
- the rectangle to be filled with the representation of the tokenselectionColor
- this color must be mixed by half with the painted output if it is not null