info.bioinfweb.treegraph.document.format
Class TextFormats
java.lang.Object
info.bioinfweb.treegraph.document.format.TextFormats
- All Implemented Interfaces:
- ElementFormats, Cloneable
- Direct Known Subclasses:
- LegendFormats, NodeFormats, ScaleBarFormats, TextLabelFormats
public class TextFormats
- extends Object
- implements ElementFormats, Cloneable
DEFAULT_FONT_NAME
public static final 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 Color DEFAULT_TEXT_COLOR
DEFAULT_DECIMAL_FORMAT_EXPR
public static final 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 String fontName
textHeight
private DistanceValue textHeight
textStyle
private int textStyle
textColor
private Color textColor
locale
private Locale locale
decimalFormat
private DecimalFormat decimalFormat
TextFormats
public TextFormats()
getFontName
public String getFontName()
setFontName
public void setFontName(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 Font getFont(float pixelsPerMillimeter)
getTextColor
public Color getTextColor()
setTextColor
public void setTextColor(Color textColor)
getLocale
public Locale getLocale()
- Return the local object used in the decimal formats.
- Returns:
setLocale
public void setLocale(Locale locale)
- Sets the local object which is used to
- Parameters:
locale -
getDecimalFormat
public DecimalFormat getDecimalFormat()
setDecimalFormat
public void setDecimalFormat(DecimalFormat decimalFormat,
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:
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 Object