|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.common.NFTextStyle
netcharts.pro.common.NFLabel
public class NFLabel
The NFLabel object describes a element of text to include the the text and the rendering attributes of the text. It is often used to describe "static" text elements like titles, legend items, text annotations and so on.
Field Summary |
---|
Fields inherited from class netcharts.pro.common.NFTextStyle |
---|
CENTER, LEFT, LINETHROUGH_DECORATION, NO_ASCENT, NO_DECORATION, NO_DESCENT, NO_LEADING, NO_MAXLINEADVANCE, OVERLINE_DECORATION, RIGHT, UNDERLINE_DECORATION |
Constructor Summary | |
---|---|
NFLabel()
Constructs a default text label. |
|
NFLabel(java.lang.String text)
Constructs a text label with the given text |
|
NFLabel(java.lang.String text,
java.awt.Color color,
java.awt.Font font)
Constructs a text label with the given text, color, and font. |
|
NFLabel(java.lang.String text,
java.awt.Color color,
java.awt.Font font,
int angle)
Constructs a text label with the given text, color, font and angle. |
|
NFLabel(java.lang.String text,
java.awt.Color color,
java.awt.Font font,
int angle,
int alignment)
Constructs a text label with the given text, color, font, angle and alignment. |
|
NFLabel(java.lang.String text,
java.awt.Color color,
java.awt.Font font,
int angle,
int alignment,
int decoration)
Constructs a text label with the given text, color, font, angle, alignment and decoration. |
Method Summary | |
---|---|
java.lang.String |
getCDL()
Generate CDL parameters representing this label |
void |
getCDL(java.lang.StringBuffer sb,
boolean includeParens)
Append CDL parameters representing this text label to the given StringBuffer. |
java.lang.String |
getText()
Get the label's text. |
void |
setCDL(java.lang.Object cdlObject)
Configures this label from a CDL parameter object. |
void |
setCDL(java.lang.String cdl)
Configures this label from a CDL parameter representation. |
void |
setCDL(java.lang.String[] elements,
int offset)
Configures this object from a CDL parameter representation. |
void |
setText(java.lang.String text)
Set the text of this label. |
Methods inherited from class netcharts.pro.common.NFTextStyle |
---|
getAlignment, getAngle, getAscent, getCDL, getColor, getDecoration, getDescent, getFont, getLeading, getMaxLineAdvance, setAlignment, setAngle, setAscent, setColor, setDecoration, setDescent, setFont, setLeading, setMaxLineAdvance, toString |
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 |
Methods inherited from interface netcharts.pro.common.NFCDLGenerator |
---|
toString |
Constructor Detail |
---|
public NFLabel()
public NFLabel(java.lang.String text)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.public NFLabel(java.lang.String text, java.awt.Color color, java.awt.Font font)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.color
- Text colorfont
- Text fontpublic NFLabel(java.lang.String text, java.awt.Color color, java.awt.Font font, int angle)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.color
- Text colorfont
- Text fontangle
- Font anglepublic NFLabel(java.lang.String text, java.awt.Color color, java.awt.Font font, int angle, int alignment)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.color
- Text colorfont
- Text fontangle
- Font anglealignment
- The text alignment.public NFLabel(java.lang.String text, java.awt.Color color, java.awt.Font font, int angle, int alignment, int decoration)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.color
- Text colorfont
- Text fontangle
- Font anglealignment
- The text alignment.decoration
- The text decoration.Method Detail |
---|
public java.lang.String getText()
public void setText(java.lang.String text)
text
- The text to be shown in the label. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line"
.public void setCDL(java.lang.Object cdlObject)
cdlObject
- CDL in a String form or in a user object.public void setCDL(java.lang.String cdl)
setCDL
in interface NFCDLGenerator
setCDL
in class NFTextStyle
cdl
- CDL in the form: ("text", textcolor, "fontname", fontsize, angle, alignment)
public void setCDL(java.lang.String[] elements, int offset)
setCDL
in class NFTextStyle
elements
- Array of parameter elements. This array is expected
to contain consecutive elements containing text, color, font, and angle information.offset
- Offset into the elements array.public java.lang.String getCDL()
getCDL
in interface NFCDLGenerator
getCDL
in class NFTextStyle
("text", textcolor, "fontname", fontsize, angle, alignment)
public void getCDL(java.lang.StringBuffer sb, boolean includeParens)
getCDL
in class NFTextStyle
sb
- Target buffer to append the CDL parametersincludeParens
- If true, this will cause the parameters to be delimited
with parenthesis.
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |