public class AminoAcidTokenPainter extends AbstractBioPolymerTokenPainter
DEFAULT_HEIGHT, DEFAULT_WIDTH, FONT_SIZE_FACTOR, MIN_FONT_SIZE
Constructor and Description |
---|
AminoAcidTokenPainter() |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
backgroundColorByRepresentation(java.lang.String tokenRepresentation,
java.awt.Color selectionColor)
Returns the same color as
SingleColorTokenPainter.getColor(String) but blends it with a selection color, if one is specified. |
protected 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 boolean |
isAmbiguity(java.lang.String tokenRepresentation)
To be implemented by inherited classes to determine whether the specified token representation
is an ambiguity code.
|
protected void |
putAminoAcidColors() |
doPaintToken
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 AminoAcidTokenPainter()
protected void putAminoAcidColors()
protected boolean isAmbiguity(java.lang.String tokenRepresentation)
AbstractBioPolymerTokenPainter
isAmbiguity
in class AbstractBioPolymerTokenPainter
tokenRepresentation
- the token representationtrue
if the token is ambiguous and shall have a background with multiple colors,
false
otherwiseprotected char[] calculateConstituents(java.lang.String tokenRepresentation)
AbstractBioPolymerTokenPainter
calculateConstituents
in class AbstractBioPolymerTokenPainter
tokenRepresentation
- the ambiguous token representationpublic java.awt.Color backgroundColorByRepresentation(java.lang.String tokenRepresentation, java.awt.Color selectionColor)
SingleColorTokenPainter
SingleColorTokenPainter.getColor(String)
but blends it with a selection color, if one is specified.backgroundColorByRepresentation
in class SingleColorTokenPainter
tokenRepresentation
- the string representation of the tokenselectionColor
- the color of the selection in the associated alignment area (may be null
)