|
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.NFVector
netcharts.pro.common.NFBaseSet
netcharts.pro.common.NFSet
netcharts.pro.common.NFNoteSet
public class NFNoteSet
An NFNoteSet describes a set of note data and appearance information. NoteSets provide an easy mechanism for bringing greater clarity to data areas within NetCharts charts. By being able to arbitrarily specify text and multipoint line vectors, items of interest can be easily identified, and critical regions can be highlighted. NoteSets can be used anywhere on the chart, both inside and outside of the data area. For the purposes of this documentation, a Note is defined as a single text string and an associated line vector (which may or may not be shown). A NoteSet is defined as one or more Notes that share a common justification, label type, box type, axis type, and arrow/line type.
An example of using notes is shown here:
NFBarchart bc = new NFBarchart(); NFNoteSet grayNoteSet = new NFNoteSet(new NFModalLabel(Color.black, new Font("Sansserif", Font.BOLD, 10)), new NFRegion(Color.gray.brighter(), NFRegion.RAISED, 2), new NFAxisMap(NFAxisMap.BOTTOM, NFAxisMap.LEFT)); NFNoteSet blueNoteSet = new NFNoteSet(new NFModalLabel(Color.black, new Font("Sansserif", Font.BOLD, 10)), new NFRegion(Color.blue.brighter(), NFRegion.RAISED, 2), new NFAxisMap(NFAxisMap.PERCENT, NFAxisMap.PERCENT)); bc.addNote(new NFNote("apples", new NFPoint(100, 100)), grayNoteSet); bc.addNote(new NFNote("oranges", new NFPoint(50, 50)), blueNoteSet); bc.addNote(new NFNote("pears", new NFPoint(40, 40)), blueNoteSet);The notes example above causes the chart to draw three notes. The first note "apples" is drawn black on a gray background, and its location (100,100) is mapped to the bottom and left axis. The second note, "oranges" is drawn black on a blue background, and its location (50,50) is mapped as a percentage of the chart size. The third note, "pears" is drawn with the same characteristics as the oranges note, just in a different location and with different text.
Field Summary | |
---|---|
static int |
BOTTOM
Bottom note justification |
static int |
BOTTOMLEFT
Bottom left note justification |
static int |
BOTTOMRIGHT
Bottom right note justification |
static int |
CENTER
Center note justification |
static int |
LEFT
Left note justification |
static java.util.Hashtable |
noteJustificationMap
noteJustificationMap hashtable - contains mapping between note justification values and associated text strings. |
static int |
RIGHT
Right note justification |
static int |
TOP
Top note justification |
static int |
TOPLEFT
Top left note justification |
static int |
TOPRIGHT
Top right note justification |
Constructor Summary | |
---|---|
NFNoteSet()
Constructs a default note set |
|
NFNoteSet(NFAxisMap axisMap)
Constructs a note set with the given axis map. |
|
NFNoteSet(NFModalLabel label,
NFRegion region)
Constructs a note set with the given label and region. |
|
NFNoteSet(NFModalLabel label,
NFRegion region,
NFAxisMap axisMap)
Constructs a note set with the given label, region, and axis map. |
Method Summary | |
---|---|
void |
addNote(NFNote note)
Appends the given note into the list |
java.lang.Object |
clone()
Does a deep copy of this noteset object |
java.lang.String |
getCDLAppearance()
Generate the CDL that creates the appearance information. |
boolean |
getDragEnabled()
Returns whether drag should be enable for the note set. |
java.awt.Color |
getFillColor()
Returns the note set fill color. |
int |
getJustify()
Returns the note justification |
NFModalLabel |
getLabel()
Returns the label used by this set |
NFArrowLine |
getLine()
Returns the line used by this set |
java.awt.Color |
getLineColor()
Returns the note set line color. |
java.lang.String |
getNoteSetName()
Returns the note set name |
NFRegion |
getRegion()
Returns the region used by this noteset |
void |
setCDLAppearance(java.lang.String cdl)
Configures the appearance information from a CDL parameter representation. |
void |
setDragEnabled(boolean dragEnabled)
Sets whether drag should be enable for the note set. |
void |
setFillColor(java.awt.Color color)
Set the fill color for the note regions. |
void |
setJustify(int justify)
Set the note justification. |
void |
setLabel(NFModalLabel label)
Set label to use for the noteset |
void |
setLine(NFArrowLine line)
Set line style to use for the noteset |
void |
setLineColor(java.awt.Color color)
Set the line color for the set. |
void |
setNoteSetName(java.lang.String noteSetName)
Set the name of the set |
void |
setRegion(NFRegion region)
Set region to use for the noteset |
Methods inherited from class netcharts.pro.common.NFSet |
---|
getAxisMap, setAxisMap |
Methods inherited from class netcharts.pro.common.NFBaseSet |
---|
addActiveLabel, getActiveLabels, getSetName, setActiveLabels, setSetName |
Methods inherited from class netcharts.pro.common.NFVector |
---|
addElement, addElement, elementAt, elementAt, getCDL, getCDL, getCDL, getCDLHasTuples, getCDLKeyValues, getCDLKeyValuesHasPoints, getMaxDimensions, getQuoteStrings, getSize, isEmptyStringAsNull, loadDataModel, loadDataModel, loadDataModel, removeElementAt, reset, setCDL, setCDLHasTuples, setCDLNullString, setElementAt, setEmptyStringAsNull, setQuoteStrings, setSize, size, skipNulls, toArray, toString |
Methods inherited from class netcharts.pro.common.NFBaseClass |
---|
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 TOPLEFT
public static final int TOP
public static final int TOPRIGHT
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int BOTTOMLEFT
public static final int BOTTOM
public static final int BOTTOMRIGHT
public static java.util.Hashtable noteJustificationMap
Constructor Detail |
---|
public NFNoteSet()
public NFNoteSet(NFModalLabel label, NFRegion region)
label
- Describes the text appearance of notes
in this noteset.region
- Describes the background appearance of notes in the noteset.public NFNoteSet(NFAxisMap axisMap)
axisMap
- Describes how note x/y values are mapped onto the chart.public NFNoteSet(NFModalLabel label, NFRegion region, NFAxisMap axisMap)
label
- Describes the text appearance of notes
in this noteset.region
- Describes the background appearance of notes in the noteset.axisMap
- Describes how note x/y values are mapped onto the chart.Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NFSet
java.lang.CloneNotSupportedException
public void setLabel(NFModalLabel label)
label
- Text style to use for the note set.public NFModalLabel getLabel()
public void setRegion(NFRegion region)
region
- to usepublic NFRegion getRegion()
public void setLine(NFArrowLine line)
line
- to usepublic NFArrowLine getLine()
public void addNote(NFNote note)
note
- to appendpublic void setJustify(int justify)
TOPLEFT, TOP, TOPRIGHT, LEFT, CENTER, RIGHT, BOTTOMLEFT,
BOTTOM, BOTTOMRIGHT
.
If the value passed is not a valid justify type an IllegalArgumentException will be thrown.
justify
- One of
TOPLEFT, TOP, TOPRIGHT, LEFT, CENTER, RIGHT, BOTTOMLEFT,
BOTTOM, BOTTOMRIGHT
.public int getJustify()
public void setNoteSetName(java.lang.String noteSetName)
setName
- Name of the notesetpublic java.lang.String getNoteSetName()
public void setFillColor(java.awt.Color color)
color
- Note background fill colorpublic java.awt.Color getFillColor()
public void setLineColor(java.awt.Color color)
color
- Line colorpublic java.awt.Color getLineColor()
public void setDragEnabled(boolean dragEnabled)
dragEnabled
- true
if enable, false
otherwisepublic boolean getDragEnabled()
true
if enable, false
otherwise.public java.lang.String getCDLAppearance()
("setName", justification)
public void setCDLAppearance(java.lang.String cdl)
cdl
- CDL in the form: ("setName", justification)
|
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 |