info.bioinfweb.treegraph.document.format
Class TextFormats
java.lang.Object
info.bioinfweb.treegraph.document.format.TextFormats
- All Implemented Interfaces:
- ElementFormats, java.lang.Cloneable
- Direct Known Subclasses:
- LegendFormats, NodeFormats, ScaleBarFormats, TextLabelFormats
public class TextFormats
- extends java.lang.Object
- implements ElementFormats, java.lang.Cloneable
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_FONT_NAME
public static final java.lang.String DEFAULT_FONT_NAME
- See Also:
- Constant Field Values
DEFAULT_TEXT_HEIGHT_IN_MM
public static final float DEFAULT_TEXT_HEIGHT_IN_MM
- See Also:
- Constant Field Values
DEFAULT_TEXT_COLOR
public static final java.awt.Color DEFAULT_TEXT_COLOR
DEFAULT_DECIMAL_FORMAT_EXPR
public static final java.lang.String DEFAULT_DECIMAL_FORMAT_EXPR
- See Also:
- Constant Field Values
PLAIN
public static final int PLAIN
- See Also:
- Constant Field Values
BOLD
public static final int BOLD
- See Also:
- Constant Field Values
ITALIC
public static final int ITALIC
- See Also:
- Constant Field Values
UNDERLINE
public static final int UNDERLINE
- See Also:
- Constant Field Values
fontName
private java.lang.String fontName
textHeight
private DistanceValue textHeight
textStyle
private int textStyle
textColor
private java.awt.Color textColor
locale
private java.util.Locale locale
decimalFormat
private java.text.DecimalFormat decimalFormat
TextFormats
public TextFormats()
getFontName
public java.lang.String getFontName()
setFontName
public void setFontName(java.lang.String fontName)
getTextHeight
public DistanceValue getTextHeight()
getDescent
public float getDescent()
hasTextStyle
public boolean hasTextStyle(int style)
getTextStyle
public int getTextStyle()
setTextStyle
public void setTextStyle(int style)
addTextStyle
public void addTextStyle(int style)
removeTextStyle
public void removeTextStyle(int style)
getFont
public java.awt.Font getFont(float pixelsPerMillimeter)
getTextColor
public java.awt.Color getTextColor()
setTextColor
public void setTextColor(java.awt.Color textColor)
getLocale
public java.util.Locale getLocale()
- Return the local object used in the decimal formats.
- Returns:
setLocale
public void setLocale(java.util.Locale locale)
- Sets the local object which is used to
- Parameters:
locale -
getDecimalFormat
public java.text.DecimalFormat getDecimalFormat()
setDecimalFormat
public void setDecimalFormat(java.text.DecimalFormat decimalFormat,
java.util.Locale locale)
- Sets a new decimal format object. The provided local object will be used to determine
the decimal format symbols. (This means that the decimal formats object may be
changed after being passed here.)
- Parameters:
decimalFormat - - the new decimal format objectlocale - - the locale object which was used to create the new decimal formats
- Throws:
java.lang.IllegalArgumentException - if one of the parameters is null
assignTextFormats
public void assignTextFormats(TextFormats other)
clone
public TextFormats clone()
- Specified by:
clone in interface ElementFormats- Overrides:
clone in class java.lang.Object