info.bioinfweb.treegraph.document.format
Class ConcreteTextFormats
java.lang.Object
info.bioinfweb.treegraph.document.format.ConcreteTextFormats
- All Implemented Interfaces:
- ElementFormats, TextFormats, Cloneable
- Direct Known Subclasses:
- LegendFormats, NodeFormats, ScaleBarFormats
public class ConcreteTextFormats
- extends Object
- implements ElementFormats, Cloneable, TextFormats
fontName
private String fontName
textHeight
private DistanceValue textHeight
textStyle
private int textStyle
textColor
private Color textColor
locale
private Locale locale
decimalFormat
private DecimalFormat decimalFormat
ConcreteTextFormats
public ConcreteTextFormats()
getFontName
public String getFontName()
- Specified by:
getFontName in interface TextFormats
setFontName
public void setFontName(String fontName)
- Specified by:
setFontName in interface TextFormats
getTextHeight
public DistanceValue getTextHeight()
- Specified by:
getTextHeight in interface TextFormats
getDescent
public float getDescent()
- Specified by:
getDescent in interface TextFormats
hasTextStyle
public boolean hasTextStyle(int style)
- Specified by:
hasTextStyle in interface TextFormats
getTextStyle
public int getTextStyle()
- Specified by:
getTextStyle in interface TextFormats
setTextStyle
public void setTextStyle(int style)
- Specified by:
setTextStyle in interface TextFormats
addTextStyle
public void addTextStyle(int style)
- Specified by:
addTextStyle in interface TextFormats
removeTextStyle
public void removeTextStyle(int style)
- Specified by:
removeTextStyle in interface TextFormats
getFont
public Font getFont(float pixelsPerMillimeter)
- Specified by:
getFont in interface TextFormats
getTextColor
public Color getTextColor()
- Specified by:
getTextColor in interface TextFormats
setTextColor
public void setTextColor(Color textColor)
- Specified by:
setTextColor in interface TextFormats
getLocale
public Locale getLocale()
- Description copied from interface:
TextFormats
- Return the local object used in the decimal formats.
- Specified by:
getLocale in interface TextFormats
- Returns:
setLocale
public void setLocale(Locale locale)
- Description copied from interface:
TextFormats
- Sets the local object which is used to
- Specified by:
setLocale in interface TextFormats
getDecimalFormat
public DecimalFormat getDecimalFormat()
- Specified by:
getDecimalFormat in interface TextFormats
setDecimalFormat
public void setDecimalFormat(DecimalFormat decimalFormat,
Locale locale)
- Description copied from interface:
TextFormats
- 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.)
- Specified by:
setDecimalFormat in interface TextFormats
- Parameters:
decimalFormat - the new decimal format objectlocale - the locale object which was used to create the new decimal formats
assignTextFormats
public void assignTextFormats(TextFormats other)
- Specified by:
assignTextFormats in interface TextFormats
clone
public ConcreteTextFormats clone()
- Specified by:
clone in interface ElementFormats- Specified by:
clone in interface TextFormats- Overrides:
clone in class Object