|
NetCharts Pro | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--netcharts.pro.common.NFBaseClass
|
+--netcharts.pro.common.NFTextStyle
The NFTextStyle describes how text is to be rendered.
| Field Summary | |
static int |
CENTER
CENTER Alignment |
static int |
LEFT
LEFT Alignment |
static int |
RIGHT
RIGHT Alignment |
| Constructor Summary | |
NFTextStyle()
Constructs a default text style. |
|
NFTextStyle(java.awt.Color color,
java.awt.Font font)
Constructs a text style with the given color and font. |
|
NFTextStyle(java.awt.Color color,
java.awt.Font font,
int angle,
int alignment)
Constructs a text style with the given color and font. |
|
| Method Summary | |
int |
getAlignment()
Gets the text alignment, either CENTER (default), LEFT or RIGHT. |
int |
getAngle()
Get the text angle. |
java.lang.String |
getCDL()
Generate CDL parameters representing this text style |
void |
getCDL(java.lang.StringBuffer sb,
boolean includeParens)
Append CDL parameters representing this text style to the given StringBuffer. |
java.awt.Color |
getColor()
Get the text color |
java.awt.Font |
getFont()
Get the text font |
void |
setAlignment(int alignment)
Set the text alignment, either CENTER (default), LEFT or RIGHT. |
void |
setAngle(int angle)
Set the text angle. |
void |
setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
void |
setCDL(java.lang.String[] elements,
int offset)
Configures this object from a CDL parameter representation. |
void |
setColor(java.awt.Color color)
Set the text color. |
void |
setFont(java.awt.Font font)
Set the text font. |
java.lang.String |
toString()
Returns a new String object representing this text style.. |
| Methods inherited from class netcharts.pro.common.NFBaseClass |
clone, getModified, getUserObject, setModified, setUserObject |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int LEFT
public static final int RIGHT
public static final int CENTER
| Constructor Detail |
public NFTextStyle()
public NFTextStyle(java.awt.Color color,
java.awt.Font font)
color - Color of text.font - The font the text will be rendered with.
public NFTextStyle(java.awt.Color color,
java.awt.Font font,
int angle,
int alignment)
color - Color of text.font - The font the text will be rendered with.angle - Font anglealignment - The text alignment.| Method Detail |
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color - Color of text.public java.awt.Font getFont()
public void setFont(java.awt.Font font)
font - The text font.public int getAngle()
public void setAngle(int angle)
angle - int value between 0-359 degrees. If the value
is outside 0 and 359 a warning will be written to the debug
object.public void setCDL(java.lang.String cdl)
setCDL in interface NFCDLGeneratorcdl - CDL in the form: (textcolor, "fontname", fontsize, angle, alignment)
public void setCDL(java.lang.String[] elements,
int offset)
elements - Array of parameter elements. This array is expected
to contain consecutive elements containing color, font, angle and alignment information.offset - Offset into the elements array.public java.lang.String getCDL()
getCDL in interface NFCDLGenerator(textcolor, fontname, fontsize, angle, alignment)public java.lang.String toString()
toString in interface NFCDLGeneratortoString in class java.lang.Object
public void getCDL(java.lang.StringBuffer sb,
boolean includeParens)
sb - Target buffer to append the CDL parametersincludeParens - If true, this will cause the parameters to be delimited
with parenthesis.public void setAlignment(int alignment)
If the value passed is not a valid alignment type, CENTER will be used.
orientation - One of LEFT, RIGHT or CENTERpublic int getAlignment()
LEFT, RIGHT or CENTER or CENTER if not defined.
|
NetCharts Pro | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2004 |
Last Modified: Apr 1, 2004 |