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 TypeFieldDescriptionintAlignment value should equal G2dLabel.LEFT/CENTER/RIGHTfloatfloat[]floatbooleanbooleanintprotected static final Stringprotected static final Stringprotected static final StringFont FamilyintFont sizeintFont Stylestatic final Stringstatic final Stringprotected static final Stringintprotected static final Stringintprotected static final charintRotationprotected booleanbooleanintLine Spacinglabel textprotected static final Stringdefault valuesprotected static final Stringprotected static final Stringintboolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault ConstructorCopy ConstructorprotectedG2dLabelDrawProp(String cls) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignValue(String type, String param) intgetAlign(int i) floatintgetClone()booleanbooleangetFieldObject(Field fld) This method allows access to java.lang.reflect.Field objects within the implementing class.static StringgetFont()intgetFontSize(int i) intgetFontStyle(int i) float[]floatintintgetMaxFontSize(int i) intintgetMinFontSize(int i) intgetRotation(int i) booleanintgetSpace(int i) intgetTinyFontSize(int i) static booleanprotected static booleanloadDefaults(BufferedReader in, String endTag, String cls) protected static voidparseDefaultLine(String type, String param, String cls) voidreadProperties(BufferedReader in, String endTag) voidset(G2dLabelDrawProp dp) voidsetAlign(int i) Sets the alignment for the label.voidsetAlphaComposite(float alpha) voidvoidsetBackgroundFill(int ft) static voidsetDefaults(G2dLabelDrawProp defaultProps) protected static voidsetDefaults(G2dLabelDrawProp defaultProps, String cls) voidsetDrawBackground(boolean b) voidsetDrawLine(boolean b) booleansetFieldObject(Field fld, Object fobj) This allows access to fields withing the implementing object to set there data.voidvoidvoidsetFontSize(int i) voidsetFontStyle(int i) voidvoidsetLineStyle(float[] s) voidsetLineWeight(float f) voidsetMaxFontSize(int size) voidsetMinFontSize(int size) voidsetRotation(int i) voidsetShowLabel(boolean b) voidsetSpace(int i) voidvoidsetTinyFontSize(int i) voidsetUseFontScaling(boolean b) booleanstatic booleanstatic booleanwriteDefaults(BufferedWriter writer) protected static booleanwriteDefaults(String cls, BufferedWriter writer) voidwriteProperties(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:
getMaxFontSizein interfaceFontProperties
-
getMinFontSize
public int getMinFontSize()- Specified by:
getMinFontSizein interfaceFontProperties
-
setMaxFontSize
public void setMaxFontSize(int size) - Specified by:
setMaxFontSizein interfaceFontProperties
-
setMinFontSize
public void setMinFontSize(int size) - Specified by:
setMinFontSizein 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:
setDrawLinein interfacePatternProperties
-
setDrawBackground
public void setDrawBackground(boolean b) - Specified by:
setDrawBackgroundin interfacePatternProperties
-
setLineColor
- Specified by:
setLineColorin interfacePatternProperties
-
setLineStyle
public void setLineStyle(float[] s) - Specified by:
setLineStylein interfacePatternProperties
-
setLineWeight
public void setLineWeight(float f) - Specified by:
setLineWeightin interfacePatternProperties
-
setBackgroundColor
- Specified by:
setBackgroundColorin interfacePatternProperties
-
setBackgroundFill
public void setBackgroundFill(int ft) - Specified by:
setBackgroundFillin interfacePatternProperties
-
setAlphaComposite
public void setAlphaComposite(float alpha) - Specified by:
setAlphaCompositein interfacePatternProperties
-
setUseFontScaling
public void setUseFontScaling(boolean b) -
getLineColor
- Specified by:
getLineColorin interfacePatternProperties
-
getLineStyle
public float[] getLineStyle()- Specified by:
getLineStylein interfacePatternProperties
-
getLineWeight
public float getLineWeight()- Specified by:
getLineWeightin interfacePatternProperties
-
getBackgroundColor
- Specified by:
getBackgroundColorin interfacePatternProperties
-
getShowLabel
public boolean getShowLabel() -
getDrawLine
public boolean getDrawLine()- Specified by:
getDrawLinein interfacePatternProperties
-
getDrawBackground
public boolean getDrawBackground()- Specified by:
getDrawBackgroundin interfacePatternProperties
-
getBackgroundFill
public int getBackgroundFill()- Specified by:
getBackgroundFillin 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:
getAlphaCompositein interfacePatternProperties
-
useFontScaling
public boolean useFontScaling() -
getFileName
-
getClone
-
set
-
writeProperties
-
readProperties
-
assignValue
-
getFieldObject
Description copied from interface:FieldAccessorThis method allows access to java.lang.reflect.Field objects within the implementing class.- Specified by:
getFieldObjectin interfaceFieldAccessor- Parameters:
fld- The field to get.- Returns:
- The data object that is stored in the given field
-
setFieldObject
Description copied from interface:FieldAccessorThis allows access to fields withing the implementing object to set there data.- Specified by:
setFieldObjectin 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:
getFontin interfaceFontProperties
-
setFont
- Specified by:
setFontin interfaceFontProperties
-
getTextColor
- Specified by:
getTextColorin interfaceFontProperties
-
setTextColor
- Specified by:
setTextColorin interfaceFontProperties
-