Package hec.gfx2d
Class G2dLabelDrawProp
java.lang.Object
hec.gfx2d.PlotProperties
hec.gfx2d.G2dLabelDrawProp
- All Implemented Interfaces:
FontProperties
,PatternProperties
,AsciiSerializable
,FieldAccessor
,Serializable
,Cloneable
- Direct Known Subclasses:
AxisLabelDrawProp
,TitleDrawProp
public class G2dLabelDrawProp
extends PlotProperties
implements Cloneable, PatternProperties, FontProperties, AsciiSerializable
Drawing properties for gfx2d labels.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Alignment value should equal G2dLabel.LEFT/CENTER/RIGHTfloat
float[]
float
boolean
boolean
int
protected static final String
protected static final String
protected static final String
Font Familyint
Font sizeint
Font Stylestatic final String
static final String
protected static final String
int
protected static final String
int
protected static final char
int
Rotationprotected boolean
boolean
int
Line Spacinglabel textprotected static final String
default valuesprotected static final String
protected static final String
int
boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ConstructorCopy Constructorprotected
G2dLabelDrawProp
(String cls) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
assignValue
(String type, String param) int
getAlign
(int i) float
int
getClone()
boolean
boolean
getFieldObject
(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.static String
getFont()
int
getFontSize
(int i) int
getFontStyle
(int i) float[]
float
int
int
getMaxFontSize
(int i) int
int
getMinFontSize
(int i) int
getRotation
(int i) boolean
int
getSpace
(int i) int
getTinyFontSize
(int i) static boolean
protected static boolean
loadDefaults
(BufferedReader in, String endTag, String cls) protected static void
parseDefaultLine
(String type, String param, String cls) void
readProperties
(BufferedReader in, String endTag) void
set
(G2dLabelDrawProp dp) void
setAlign
(int i) Sets the alignment for the label.void
setAlphaComposite
(float alpha) void
void
setBackgroundFill
(int ft) static void
setDefaults
(G2dLabelDrawProp defaultProps) protected static void
setDefaults
(G2dLabelDrawProp defaultProps, String cls) void
setDrawBackground
(boolean b) void
setDrawLine
(boolean b) boolean
setFieldObject
(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.void
void
void
setFontSize
(int i) void
setFontStyle
(int i) void
void
setLineStyle
(float[] s) void
setLineWeight
(float f) void
setMaxFontSize
(int size) void
setMinFontSize
(int size) void
setRotation
(int i) void
setShowLabel
(boolean b) void
setSpace
(int i) void
void
setTinyFontSize
(int i) void
setUseFontScaling
(boolean b) boolean
static boolean
static boolean
writeDefaults
(BufferedWriter writer) protected static boolean
writeDefaults
(String cls, BufferedWriter writer) void
writeProperties
(BufferedWriter writer, String endTag) Methods inherited from class hec.gfx2d.PlotProperties
dumpDefaults, getDefaultBoolean, getDefaultColor, getDefaultDouble, getDefaultFloat, getDefaultFloatArray, getDefaultFont, getDefaultInsets, getDefaultInt, getDefaultObject, getDefaults, getDefaultString, isDefault, isDefault, isDefault, isDefault, isDefault, isDefault, isDefault, isDefault, isDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefault, setDefaults
-
Field Details
-
MULTI_LINE_CHARACTER
protected static final char MULTI_LINE_CHARACTER- See Also:
-
text
label text -
SAVE_TEXT_PROPERTY
protected boolean SAVE_TEXT_PROPERTY -
TEXT
default values- See Also:
-
FONT_SIZE
- See Also:
-
TINY_FONT_SIZE
- See Also:
-
MIN_FONT_SIZE
- See Also:
-
MAX_FONT_SIZE
- See Also:
-
FONT_STYLE
- See Also:
-
FONT_FAMILY
- See Also:
-
TEXT_COLOR
- See Also:
-
fontSize
public int fontSizeFont size -
tinyFontSize
public int tinyFontSize -
minFontSize
public int minFontSize -
maxFontSize
public int maxFontSize -
fontStyle
public int fontStyleFont Style -
fontFamily
Font Family -
font
-
textColor
-
align
public int alignAlignment value should equal G2dLabel.LEFT/CENTER/RIGHT -
rotation
public int rotationRotation -
space
public int spaceLine Spacing -
showLabel
public boolean showLabel -
drawBorder
public boolean drawBorder -
drawBackground
public boolean drawBackground -
borderStyle
public float[] borderStyle -
borderWeight
public float borderWeight -
borderColor
-
backgroundColor
-
fillPattern
public int fillPattern -
iconPath
-
alphaComposite
public float alphaComposite -
useFontScaling
public boolean useFontScaling -
LABEL_BEGIN
- See Also:
-
LABEL_END
- See Also:
-
-
Constructor Details
-
G2dLabelDrawProp
public G2dLabelDrawProp()Default Constructor -
G2dLabelDrawProp
-
G2dLabelDrawProp
Copy Constructor
-
-
Method Details
-
getMaxFontSize
public int getMaxFontSize()- Specified by:
getMaxFontSize
in interfaceFontProperties
-
getMinFontSize
public int getMinFontSize()- Specified by:
getMinFontSize
in interfaceFontProperties
-
setMaxFontSize
public void setMaxFontSize(int size) - Specified by:
setMaxFontSize
in interfaceFontProperties
-
setMinFontSize
public void setMinFontSize(int size) - Specified by:
setMinFontSize
in interfaceFontProperties
-
setFontSize
public void setFontSize(int i) -
setTinyFontSize
public void setTinyFontSize(int i) -
setFontStyle
public void setFontStyle(int i) -
setFontFamily
-
setAlign
public void setAlign(int i) Sets the alignment for the label. Alignment value should equal G2dLabel.LEFT/CENTER/RIGHT -
setRotation
public void setRotation(int i) -
setSpace
public void setSpace(int i) -
setShowLabel
public void setShowLabel(boolean b) -
setDrawLine
public void setDrawLine(boolean b) - Specified by:
setDrawLine
in interfacePatternProperties
-
setDrawBackground
public void setDrawBackground(boolean b) - Specified by:
setDrawBackground
in interfacePatternProperties
-
setLineColor
- Specified by:
setLineColor
in interfacePatternProperties
-
setLineStyle
public void setLineStyle(float[] s) - Specified by:
setLineStyle
in interfacePatternProperties
-
setLineWeight
public void setLineWeight(float f) - Specified by:
setLineWeight
in interfacePatternProperties
-
setBackgroundColor
- Specified by:
setBackgroundColor
in interfacePatternProperties
-
setBackgroundFill
public void setBackgroundFill(int ft) - Specified by:
setBackgroundFill
in interfacePatternProperties
-
setAlphaComposite
public void setAlphaComposite(float alpha) - Specified by:
setAlphaComposite
in interfacePatternProperties
-
setUseFontScaling
public void setUseFontScaling(boolean b) -
getLineColor
- Specified by:
getLineColor
in interfacePatternProperties
-
getLineStyle
public float[] getLineStyle()- Specified by:
getLineStyle
in interfacePatternProperties
-
getLineWeight
public float getLineWeight()- Specified by:
getLineWeight
in interfacePatternProperties
-
getBackgroundColor
- Specified by:
getBackgroundColor
in interfacePatternProperties
-
getShowLabel
public boolean getShowLabel() -
getDrawLine
public boolean getDrawLine()- Specified by:
getDrawLine
in interfacePatternProperties
-
getDrawBackground
public boolean getDrawBackground()- Specified by:
getDrawBackground
in interfacePatternProperties
-
getBackgroundFill
public int getBackgroundFill()- Specified by:
getBackgroundFill
in interfacePatternProperties
-
getFontSize
public int getFontSize(int i) -
getTinyFontSize
public int getTinyFontSize(int i) -
getMinFontSize
public int getMinFontSize(int i) -
getMaxFontSize
public int getMaxFontSize(int i) -
getFontStyle
public int getFontStyle(int i) -
getFontFamily
-
getAlign
public int getAlign(int i) -
getRotation
public int getRotation(int i) -
getSpace
public int getSpace(int i) -
getAlphaComposite
public float getAlphaComposite()- Specified by:
getAlphaComposite
in interfacePatternProperties
-
useFontScaling
public boolean useFontScaling() -
getFileName
-
getClone
-
set
-
writeProperties
-
readProperties
-
assignValue
-
getFieldObject
Description copied from interface:FieldAccessor
This method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObject
in interfaceFieldAccessor
- Parameters:
fld
- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessor
This allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObject
in interfaceFieldAccessor
- Parameters:
fld
- The java field object representing the member field to be setfobj
- The data to set in that field- Returns:
- returns true if successful
-
loadDefaults
-
loadDefaults
-
parseDefaultLine
-
writeDefaults
public static boolean writeDefaults() -
writeDefaults
-
writeDefaults
-
setDefaults
-
setDefaults
-
getFont
- Specified by:
getFont
in interfaceFontProperties
-
setFont
- Specified by:
setFont
in interfaceFontProperties
-
getTextColor
- Specified by:
getTextColor
in interfaceFontProperties
-
setTextColor
- Specified by:
setTextColor
in interfaceFontProperties
-