|
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.NFTitle
public class NFTitle
The NFTitle property describes the titles on a chart. Each title contains objects that represent the text label, the background region, and an associated active label. A typical use of this object is as follows:
...
Font font = new Font("Comic Sans MS", Font.PLAIN, 10);
NFTitle top = new NFTitle(new NFLabel("My Top Title", black, font),
new NFRegion(Color.gray, NFRegion.RAISED, 2));
NFTitle bottom = (NFTitle)top.clone();
bottom.setText("My Bottom Title");
chart.setTopTitle(top);
chart.setBottomTitle(bottom);
...
This would create both a top and bottom title, identical except for the
text.
| Field Summary | |
|---|---|
static int |
BOTTOM
BOTTOM Alignment |
static int |
CENTER
CENTER Alignment |
static int |
LEFT
LEFT Alignment |
static int |
RIGHT
RIGHT Alignment |
static int |
TOP
TOP Alignment |
| Constructor Summary | |
|---|---|
NFTitle()
Constructs a default title object |
|
NFTitle(java.util.Hashtable state,
java.lang.String parameterName)
Constructs a title using CDL parameters |
|
NFTitle(NFLabel label,
NFRegion region)
Constructs a title object using the given NFLabel text object and background NFRegion object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone this title. |
NFActiveLabel |
getActiveLabel()
Get the title active label |
boolean |
getBackgroundExtension()
Gets the title's background extension, either OFF (default), or ON. |
java.util.Vector |
getCDLVector()
NFTitle is a compound object representing multiple CDL parameters. |
java.util.Vector |
getCDLVector(java.util.Vector v)
NFTitle is a compound object representing multiple CDL parameters. |
java.util.Vector |
getCDLVector(java.util.Vector v,
java.lang.String prefix,
java.lang.String suffix)
NFTitle is a compound object representing multiple CDL parameters. |
int |
getExternalAlignment()
Gets the title's external alignment, either CENTER (default), TOP, BOTTOM, LEFT or RIGHT. |
java.awt.Color |
getFillColor()
Get the title's background color |
java.awt.Font |
getFont()
Get the title font |
NFLabel |
getLabel()
Return title label |
int |
getLabelAlignment()
Gets the label text alignment, either CENTER (default), LEFT or RIGHT. |
NFRegion |
getRegion()
Return title region |
java.lang.String |
getText()
Get the title's text. |
int |
getTextAngle()
Get the text angle. |
int |
getTextAscent()
Gets the override of the font ascent. |
java.awt.Color |
getTextColor()
Get the text color |
int |
getTextDecoration()
Gets the text decoration. |
int |
getTextDescent()
Gets the override of the font descent. |
int |
getTextLeading()
Gets the override of the font leading. |
int |
getTextMaxLineAdvance()
Gets the max line advance. |
void |
setActiveLabel(NFActiveLabel activeLabel)
Set active label for this title |
void |
setBackgroundExtension(boolean backgroundExtension)
Set the title's background extension, either OFF or ON. |
void |
setCDLParameterName(java.lang.String parameterName)
Sets this title object's parameter name. |
void |
setExternalAlignment(int alignment)
Set the title's external alignment, either CENTER (default), TOP, BOTTOM, LEFT or RIGHT. |
void |
setFillColor(java.awt.Color fillColor)
Set the title's background color. |
void |
setFont(java.awt.Font font)
Set the title font. |
void |
setLabel(NFLabel label)
Set label for this title. |
void |
setLabelAlignment(int alignment)
Set the label's text alignment, either CENTER (default), LEFT or RIGHT. |
void |
setParameterName(java.lang.String parameterName)
Sets the associated parameter name for when outputting. |
void |
setRegion(NFRegion region)
Set region for this title. |
void |
setText(java.lang.String text)
Set the text of this title. |
void |
setTextAngle(int textAngle)
Set the text angle. |
void |
setTextAscent(int ascent)
Set the override of the font ascent. |
void |
setTextColor(java.awt.Color color)
Set the text color. |
void |
setTextDecoration(int decoration)
Set the text decoration. |
void |
setTextDescent(int descent)
Set the override of the font descent. |
void |
setTextLeading(int leading)
Set the override of the font leading. |
void |
setTextMaxLineAdvance(int maxLineAdvance)
Set the max line advance. |
| Methods inherited from class netcharts.pro.common.NFBaseClass |
|---|
getModified, getUserObject, setModified, setUserObject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int RIGHT
public static final int CENTER
public static final int TOP
public static final int BOTTOM
| Constructor Detail |
|---|
public NFTitle()
public NFTitle(NFLabel label,
NFRegion region)
label - The label object containing the text and text style.region - The region object describing the title background.
public NFTitle(java.util.Hashtable state,
java.lang.String parameterName)
state - Hashtable containing CDL parameters.parameterName - Name of the parameter associated with this
particular title (e.g. LeftTitle)| Method Detail |
|---|
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class NFBaseClassjava.lang.CloneNotSupportedExceptionpublic void setText(java.lang.String text)
text - The text to be shown in the title. Note that multiple
lines may be delimited using the '\n' character, as in:
"First Line\nSecond Line".public java.lang.String getText()
public void setFont(java.awt.Font font)
font - The title font.public java.awt.Font getFont()
public void setTextAngle(int textAngle)
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 int getTextAngle()
public void setTextColor(java.awt.Color color)
color - Color of text.public java.awt.Color getTextColor()
public void setTextDecoration(int decoration)
int "|" operator)
two or more of the NFTextStyle.UNDERLINE_DECORATION, NFTextStyle.OVERLINE_DECORATION and NFTextStyle.LINETHROUGH_DECORATION constants.
decoration - The text decoration valuepublic int getTextDecoration()
public void setFillColor(java.awt.Color fillColor)
fillColor - The background color.public java.awt.Color getFillColor()
public void setActiveLabel(NFActiveLabel activeLabel)
activeLabel - Active Label allowing a rollover label
or drilldown operation from this title.public NFActiveLabel getActiveLabel()
public void setLabel(NFLabel label)
label - NFLabel object.public NFLabel getLabel()
public void setRegion(NFRegion region)
region - public NFRegion getRegion()
public java.util.Vector getCDLVector(java.util.Vector v,
java.lang.String prefix,
java.lang.String suffix)
v - vector to append NFKeyValue objects to. If null is sent in, a new Vector
will be created.prefix - Text to place before the parameterName in the key value pairs.suffix - Text to place after the parameterName in the key value pairs.
public java.util.Vector getCDLVector(java.util.Vector v)
v - vector to append NFKeyValue objects to. If null is sent in, a new Vector
will be created.
public java.util.Vector getCDLVector()
public void setCDLParameterName(java.lang.String parameterName)
parameterName - CDL name of this title.public void setExternalAlignment(int alignment)
If the value passed is not a valid alignment type, CENTER will be used.
orientation - One of LEFT, RIGHT, TOP, BOTTOM or CENTERpublic void setBackgroundExtension(boolean backgroundExtension)
backgroundExtension - public int getExternalAlignment()
LEFT, RIGHT, TOP, BOTTOM or CENTER
or CENTER if not defined.public boolean getBackgroundExtension()
public void setLabelAlignment(int alignment)
If the value passed is not a valid alignment type, CENTER will be used.
orientation - One of LEFT, RIGHT or CENTERpublic int getLabelAlignment()
LEFT, RIGHT or CENTER or
CENTER if not defined.public void setParameterName(java.lang.String parameterName)
parameterName - public void setTextAscent(int ascent)
ascent - The ascent.public int getTextAscent()
public void setTextDescent(int descent)
descent - The descent.public int getTextDescent()
public void setTextLeading(int leading)
leading - The leading.public int getTextLeading()
public void setTextMaxLineAdvance(int maxLineAdvance)
maxLineAdvance - The max line advance.public int getTextMaxLineAdvance()
|
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 - 2018 |
Last Modified: Jan 7, 2018 |