|
NetCharts Pro | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnetcharts.pro.common.NFGraph
public abstract class NFGraph
Abstract superclass for all chart rendering engines. Provides a number of methods and utilities that are used for all NetCharts objects.
| Field Summary | |
|---|---|
static int |
ANTIALIAS_OFF
Indicates an AntiAlias mode |
static int |
ANTIALIAS_ON
Indicates an AntiAlias mode |
static int |
ANTIALIAS_ONDRAW
Indicates an AntiAlias mode |
static int |
ANTIALIAS_ONTEXT
Indicates an AntiAlias mode |
static java.util.Hashtable |
antiAliasModeMap
The set of allowed anti-alias modes. |
static int |
BAR
Indicates a bar chart type. |
static int |
BAR3D
Indicates a 3D bar chart type. |
static int |
BOX
Indicates an box chart type. |
static int |
BUBBLE
Indicates an bubble chart type. |
static int |
COMBO
Indicates an Combo chart type. |
static int |
DIAGRAM
Indicates an diagram chart type. |
static int |
DIAL
Indicates an dial chart type. |
static int |
DWELL_ANIMATION_STYLE_HIGHLIGHT
Dwell animation style highlight |
static int |
DWELL_ANIMATION_STYLE_NONE
No dwell animation |
static int |
FADE
Indicates legend animation style type |
static int |
HEATMAP
Indicates a heatmap chart type. |
static int |
HIGHLIGHT
Indicates legend dwell animation style type |
static int |
HISTOGRAM
Indicates a Histogram chart type. |
static int |
LABEL_ANIMATION_STYLE_FADE
Label animation style fade |
static int |
LABEL_ANIMATION_STYLE_NONE
No label animation |
static int |
LEGEND_ANIMATION_STYLE_FADE
Legend animation style fade |
static int |
LEGEND_ANIMATION_STYLE_NONE
No legend animation |
static int |
LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT
Legend dwell animation style highlight |
static int |
LEGEND_DWELL_ANIMATION_STYLE_NONE
No legend dwell animation |
static int |
LINE
Indicates an line chart type. |
static int |
MULTIPIE
Indicates a MultiPie chart type. |
static int |
PARETO
Indicates a pareto chart type. |
static int |
PIE
Indicates a pie chart type. |
static int |
POLAR
Indicates an radar chart type. |
static int |
RADAR
Indicates an radar chart type. |
static int |
STOCK
Indicates an stock chart type. |
static int |
STRIP
Indicates an strip chart type. |
static int |
TIME
Indicates an time chart type. |
static int |
XY
Indicates an XY chart type. |
| Constructor Summary | |
|---|---|
NFGraph()
Constructs a default NFGraph object. |
|
NFGraph(javax.swing.JPanel panel)
Constructs an NFGraph object on the given JPanel. |
|
NFGraph(javax.swing.JPanel panel,
java.util.Properties runtimeProperties)
Constructs an NFGraph object on the given JPanel. |
|
NFGraph(java.util.Properties runtimeProperties)
Constructs a default NFGraph object. |
|
| Method Summary | |
|---|---|
void |
addChartActionListener(NFChartActionListener l)
Adds a chart action listener. |
void |
addGraphObserver(NFGraphObserver observer)
Adds a graph observer to the peer rendering engine. |
void |
addNote(NFNote note,
NFNoteSet set)
Convenience method to add notes to the chart. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a bound property change listener for this chart. |
void |
display()
Tells the graph to update. |
boolean |
dwellDisplay(boolean onoff,
netcharts.graphics.NFActiveLabel label)
Maps peer rendering engine events to ChartActionEvents. |
boolean |
dwellPress(java.awt.Event evt,
int x,
int y,
netcharts.graphics.NFActiveLabel label)
Maps peer rendering engine events to ChartActionEvents. |
void |
finalize()
Graph finalize method. |
int |
getActiveClicks()
Gets the active clicks. |
boolean |
getAlwaysUpdate()
Gets the alwaysUpdate attribute. |
boolean |
getAntiAlias()
Calls getAntiAliasMode to get the state of the anti aliasing feature. |
int |
getAntiAliasMode()
Gets the state of the anti aliasing feature. |
NFActiveLabel |
getBackgroundActiveLabel()
Gets the background active label. |
NFFillPattern |
getBackgroundFillPattern()
Gets the background fill pattern. |
NFRegion |
getBackgroundRegion()
Returns the chart background region. |
boolean |
getBuildAnimationEnabled()
Determine if build animations are enabled in supported output formats. |
java.lang.String |
getCDL()
Returns the CDL representation of the chart (same as toString). |
int |
getChartElementSpacing()
Gets the chart element spacing. |
java.lang.String |
getChartName()
Get the chart name. |
java.awt.Dimension |
getChartSize()
Gets the chart size - note that this may be meaningless if the container object does not allow the chart to resize. |
NFVector |
getColorTable()
Gets the color table, This represents a default list of colors that the chart will use if certain data attribute colors are not explicitly defined. |
boolean |
getDataActiveLabelsEnabled()
Get whether or not popups over data area are enabled. |
abstract java.lang.String |
getDefaultData()
Returns the default data used for the chart. |
NFDwell |
getDwell()
Gets the dwell, or "ActiveLabel" style. |
NFDwellAnimation |
getDwellAnimation()
Get the dwell animation style. |
NFFillBorder |
getDwellAnimationHighlight()
Gets the dwell animation highlight. |
int |
getDwellAnimationStyle()
Get the dwell animation style. |
int |
getDwellOffset()
Gets the dwell offset chart. |
java.util.Vector |
getErrors()
Returns the Vector of errors generated during a template load. |
NFTitle |
getFooter()
Returns the chart footer. |
JGraph |
getGraph()
Returns the peer rendering engine. |
static NFGraph |
getGraphFromTemplate(java.io.File template)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.File template,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.File template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.File template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.InputStream template)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.InputStream template,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.InputStream template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.io.InputStream template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.lang.String template)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.lang.String template,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.lang.String template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.lang.String template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.net.URL template)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.net.URL template,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.net.URL template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
This method is a convenience function that allows any chart object to be created based on the given template. |
static NFGraph |
getGraphFromTemplate(java.net.URL template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
This method is a convenience function that allows any chart object to be created based on the given template. |
java.awt.Graphics |
getGraphGraphics()
Returns the graphics object that is being used to draw the graph. |
NFTitle |
getHeader()
Returns the chart header. |
int |
getLabelAnimationStyle()
Get the label animation style. |
NFTitle |
getLeftTitle()
Returns the chart left title. |
NFLegend |
getLegend()
Returns the chart legend. |
int |
getLegendAnimationStyle()
Get the legend animation style. |
NFLegendDwellAnimation |
getLegendDwellAnimation()
Get the legend dwell animation style. |
NFFillBorder |
getLegendDwellAnimationHighlight()
Gets the legend dwell animation highlight. |
int |
getLegendDwellAnimationStyle()
Get the legend dwell animation style. |
static java.lang.String |
getLicenseActivationKey()
Get the license activation key. |
java.util.Locale |
getLocale()
Gets the locale. |
java.util.Hashtable |
getMetaData()
Gets the meta data. |
java.awt.Dimension |
getMinimumSize()
Gets the minimum size - this should be equivalent to the value passed in "setChartSize" or 400x400 if not defined. |
NFNoteSeries |
getNoteSeries()
Gets the charts note series. |
NFNumberFormat |
getNumberFormat()
Gets the number format. |
int |
getNumErrors()
Returns the number of errors generated during a template load. |
javax.swing.JPanel |
getPanel()
Gets the JPanel the chart is drawn on. |
NFAreaSize |
getPlotArea()
Gets the plot area. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size - this should be equivalent to the value passed in "setChartSize" or 400x400 if not defined. |
NFTitle |
getRightTitle()
Returns the chart right title. |
javax.swing.JPanel |
getRootPanel()
Gets the root chart panel. |
NFFillBorder |
getRubberband()
Gets the rubberband for zoom. |
double |
getScaleFactor()
Gets the scale factor. |
int |
getTitleSpacing()
Gets the title spacing. |
boolean |
getToggleDataVisibility()
Returns whether show/hide data should be enabled when clicking on a legend item true enable show/hide data false disable show/hide data |
abstract int |
getType()
Returns the chart type. |
static java.lang.String |
getVersion()
Get the current product version. |
void |
graphDrawn(java.awt.Graphics g)
This method is called after the graph has been drawn. |
void |
graphTooSmall(java.awt.Dimension size)
This method is called if the graph is trying to be drawn, but has not been given enough room to draw itself in. |
void |
initializeFromFile(java.io.File chartTemplate)
This initializes the chart from a file object. |
void |
initializeFromString(java.lang.String chartTemplate)
This initializes the chart from a CDL string. |
void |
initializeFromURL(java.net.URL chartTemplate)
This initializes the chart from a URL object. |
void |
loadFromTemplate(java.io.File chartTemplate)
This initializes the chart from a File object. |
void |
loadFromTemplate(java.lang.String chartTemplate)
This initializes the chart from a CDL string. |
void |
loadFromTemplate(java.net.URL chartTemplate)
This initializes the chart from a URL object. |
static void |
loadLicenseFile(java.net.URL u)
This method is called to load the given license file, using the URL provided. |
void |
paint(java.awt.Graphics g)
Deprecated. |
void |
postDrag(java.lang.Object obj,
double newX,
double newY)
This method is called immediately after a drag activity, allowing the observer to monitor the new settings. |
void |
postScroll(java.lang.Object obj,
double scrollMin,
double scrollMax,
double scaleMin,
double scaleMax)
This method is called immediately after a scroll/zoom activity, allowing the observer to monitor the new settings. |
boolean |
preDrag(java.lang.Object obj,
double curX,
double curY,
double newX,
double newY)
This method is called immediately prior to a drag operation, allowing the observer to examine the current and desired settings and to perform any custom processing. |
boolean |
preScroll(java.lang.Object obj,
double scrollMin,
double scrollMax,
double curScaleMin,
double curScaleMax,
double newScaleMin,
double newScaleMax)
This method is called immediately prior to a scroll/zoom activity, allowing the observer to examine the current and desired settings and to perform any custom processing. |
void |
readExternal(java.io.ObjectInput in)
Configures this chart object from a serialized object. |
void |
removeChartActionListener(NFChartActionListener l)
Removes a chart action listener. |
void |
removeGraphObserver(NFGraphObserver observer)
Removes a graph observer to the peer rendering engine. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a bound property change listener for this chart. |
void |
resetState()
Resets all of the parameter values to their initial state. |
void |
sendData(java.lang.String key,
java.lang.String value)
Method to pass a Chart Definition Language (CDL) parameter directly to the peer rendering engine - This will bypass any objects that have been created so should not be used unless all parameters are passed in this way. |
void |
sendData(java.lang.String key,
java.lang.String value,
boolean sendUpdate)
Method to pass a Chart Definition Language (CDL) parameter directly to the peer rendering engine - This will bypass any objects that have been created so should not be used unless all parameters are passed in this way. |
void |
sendData(java.util.Vector parameterVector)
Method to pass one more Chart Definition Language (CDL) parameters directly to the peer rendering engine - This will bypass any objects that have been created so should not be used unless all parameters are passed in this way. |
void |
sendData(java.util.Vector parameterVector,
boolean sendUpdate)
Method to pass one more Chart Definition Language (CDL) parameters directly to the peer rendering engine - This will bypass any objects that have been created so should not be used unless all parameters are passed in this way. |
void |
sendUpdate()
Tells the graph to update. |
void |
set(java.lang.Object expr)
Parses the given CDL parameter expression. |
void |
set(java.lang.String param,
int itemIndex,
int attrIndex,
java.lang.Object val)
Set the data value for a specific attribute within a TUPLE VECTOR. |
void |
set(java.lang.String param,
int itemIndex,
java.lang.Object val)
Set the data value for a specific attribute or item within a TUPLE or VECTOR parameter, based on the itemIndex given. |
void |
set(java.lang.String param,
java.lang.Object val)
Set the data value for the given parameter. |
void |
set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object val)
Set the data value for a specific attribute or item within a TUPLE or VECTOR parameter, based on the given itemKey. |
void |
set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object attrKey,
java.lang.Object val)
Set the data value for a specific attribute within a TUPLE VECTOR. |
void |
setActiveClicks(int activeClicks)
Sets the active clicks. |
void |
setAlwaysUpdate(boolean alwaysUpdate)
Sets the alwaysUpdate attribute. |
void |
setAntiAlias(boolean antiAlias)
Calls setAntiAliasMode to set the state of the anti aliasing feature. |
void |
setAntiAliasMode(int antiAliasMode)
Sets the state of the anti aliasing feature. |
void |
setBackgroundActiveLabel(NFActiveLabel backgroundActiveLabel)
Sets the background active label. |
void |
setBackgroundFillPattern(NFFillPattern backgroundFillPattern)
Sets the background fill pattern. |
void |
setBackgroundRegion(NFRegion backgroundRegion)
Sets the chart background region. |
void |
setBuildAnimationEnabled(boolean buildAnimationEnabled)
Enable build animations in supported output formats. |
void |
setChartElementSpacing(int chartElementSpacing)
Sets the chart element spacing. |
void |
setChartName(java.lang.String name)
Set the chart name. |
void |
setChartSize(java.awt.Dimension chartSize)
Sets the chart size - note that this may be meaningless if the container object does not allow the chart to resize. |
void |
setColorTable(NFVector colorTable)
Sets the color table. |
void |
setDataActiveLabelsEnabled(boolean activeLabelsEnabled)
Set enable popup labels over data areas. |
void |
setDocumentBase(java.lang.String documentBase)
Sets the document base for chart generation. |
void |
setDwell(NFDwell dwell)
Sets the dwell, or "ActiveLabel" style. |
void |
setDwellAnimation(NFDwellAnimation dwellAnimation)
Set the dwell animation style. |
void |
setDwellAnimationHighlight(NFFillBorder fb)
Sets the dwell animation highlight. |
void |
setDwellAnimationStyle(int style)
Set the dwell animation style. |
void |
setDwellOffset(int dwellOffset)
Sets the dwell offset for the chart. |
void |
setFooter(NFTitle footer)
Sets the chart footer |
void |
setHeader(NFTitle header)
Sets the chart header |
void |
setLabelAnimationStyle(int style)
Set the label animation style. |
void |
setLeftTitle(NFTitle leftTitle)
Sets the chart left title |
void |
setLegend(NFLegend legend)
Sets the chart legend |
void |
setLegendAnimationStyle(int style)
Set the legend animation style. |
void |
setLegendDwellAnimation(NFLegendDwellAnimation legendDwellAnimation)
Set the legend dwell animation style. |
void |
setLegendDwellAnimationHighlight(NFFillBorder fb)
Sets the legend dwell animation highlight. |
void |
setLegendDwellAnimationStyle(int style)
Set the legend dwell animation style. |
static void |
setLicenseKey(byte[] key)
This method can be used to programmatically set a license key. |
static void |
setLicenseKey(java.lang.String key)
This method can be used to programmatically set a license key. |
static void |
setLicenseLocation(java.io.File location)
This method can be used to programmatically set the folder containing the license. |
void |
setLocale(java.util.Locale locale)
Sets the locale. |
void |
setMetaData(java.util.Hashtable metaData)
Sets the meta data. |
void |
setNoteSeries(NFNoteSeries noteSeries)
Sets the charts note series. |
void |
setNumberFormat(NFNumberFormat numberFormat)
Sets the number format. |
void |
setParentApplet(java.applet.Applet applet)
If the chart is used in an applet-based application, the parent applet should be supplied in order to allow the rendering engine to find external files as needed. |
void |
setPlotArea(NFAreaSize plotArea)
Sets the plot area. |
void |
setRightTitle(NFTitle rightTitle)
Sets the chart right title |
void |
setRubberband(NFFillBorder fb)
Sets the rubberband. |
void |
setScaleFactor(double scaleFactor)
Sets the scale factor. |
void |
setSize(java.awt.Dimension chartSize)
Sets the chart size. |
void |
setSize(int width,
int height)
Sets the chart size. |
void |
setTitleSpacing(int titleSpacing)
Sets the title spacing. |
void |
setToggleDataVisibility(boolean toggleDataVisibility)
Sets whether show/hide data should be enabled when clicking on a legend item |
void |
start()
Starts the chart applet. |
void |
stop()
Stops the chart applet. |
java.lang.String |
toString()
Returns the CDL representation of the chart. |
void |
writeChart(java.lang.StringBuffer sb)
Writes this chart into a string buffer |
void |
writeExternal(java.io.ObjectOutput out)
Writes this chart into an object for serialization. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int BAR
public static final int BAR3D
public static final int PIE
public static final int XY
public static final int COMBO
public static final int DIAGRAM
public static final int STRIP
public static final int TIME
public static final int STOCK
public static final int BOX
public static final int LINE
public static final int DIAL
public static final int BUBBLE
public static final int RADAR
public static final int POLAR
public static final int PARETO
public static final int HEATMAP
public static final int MULTIPIE
public static final int HISTOGRAM
public static final int ANTIALIAS_ON
public static final int ANTIALIAS_ONDRAW
public static final int ANTIALIAS_ONTEXT
public static final int ANTIALIAS_OFF
public static final int FADE
public static final int HIGHLIGHT
public static final int LEGEND_ANIMATION_STYLE_NONE
public static final int LEGEND_ANIMATION_STYLE_FADE
public static final int LABEL_ANIMATION_STYLE_NONE
public static final int LABEL_ANIMATION_STYLE_FADE
public static final int DWELL_ANIMATION_STYLE_NONE
public static final int DWELL_ANIMATION_STYLE_HIGHLIGHT
public static final int LEGEND_DWELL_ANIMATION_STYLE_NONE
public static final int LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT
public static java.util.Hashtable antiAliasModeMap
ON, ONDRAW, ONTEXT, OFF.
| Constructor Detail |
|---|
public NFGraph()
public NFGraph(java.util.Properties runtimeProperties)
Currently available runtime properties are:
Properties props = new Properties();
props.put("DateFormats", "\"dd/MM/yy HH:mm:ss\",\"dd-MMM-yyyy\"");
runtimeProperties - A java.util.Properties object containing the set
of runtime properties to use when generating the chart.public NFGraph(javax.swing.JPanel panel)
panel - Panel to draw graph on.
public NFGraph(javax.swing.JPanel panel,
java.util.Properties runtimeProperties)
panel - Panel to draw graph on.runtimeProperties - A java.util.Properties object containing the set
of runtime properties to use when generating the chart. See the
NFGraph(java.util.Properties) constructor
for a list of valid Properties.| Method Detail |
|---|
public abstract java.lang.String getDefaultData()
public abstract int getType()
public void initializeFromString(java.lang.String chartTemplate)
chartTemplate - String of CDL datapublic void initializeFromFile(java.io.File chartTemplate)
chartTemplate - File pointing to CDL datapublic void initializeFromURL(java.net.URL chartTemplate)
chartTemplate - URL pointing to CDL datapublic void loadFromTemplate(java.io.File chartTemplate)
chartTemplate - File pointing to CDL data.resetState()public void loadFromTemplate(java.net.URL chartTemplate)
chartTemplate - URL pointing to CDL data.resetState()
public void loadFromTemplate(java.lang.String chartTemplate)
throws java.lang.Exception
chartTemplate - String containg the CDL data.
java.lang.ExceptionresetState()public JGraph getGraph()
public java.awt.Graphics getGraphGraphics()
public void setDocumentBase(java.lang.String documentBase)
documentBase - public void setParentApplet(java.applet.Applet applet)
applet - The parent applet.
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic java.util.Vector getErrors()
public int getNumErrors()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - the property change listener to be addedpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - the property change listener to be removedpublic void stop()
public void start()
public void display()
public void sendUpdate()
public void sendData(java.lang.String key,
java.lang.String value)
key - The parameter name, e.g., Backgroundvalue - The CDL value e.g., (RAISED, 2, gray)
public void sendData(java.lang.String key,
java.lang.String value,
boolean sendUpdate)
key - The parameter name, e.g., Backgroundvalue - The CDL value e.g., (RAISED, 2, gray)sendUpdate - If true, the chart is immediately updated
with the new data.public void sendData(java.util.Vector parameterVector)
parameterVector - Contains a list of NFKeyValue elementsNFKeyValue
public void sendData(java.util.Vector parameterVector,
boolean sendUpdate)
parameterVector - Contains a list of NFKeyValue elementssendUpdate - If true causes the chart to update immediatelyNFKeyValuepublic void setAlwaysUpdate(boolean alwaysUpdate)
alwaysUpdate - public boolean getAlwaysUpdate()
public void setBackgroundRegion(NFRegion backgroundRegion)
backgroundRegion - Region object representing the backgroundpublic NFRegion getBackgroundRegion()
public void setFooter(NFTitle footer)
footer - Title object representing the footerpublic NFTitle getFooter()
public void setHeader(NFTitle header)
header - Title object representing the headerpublic NFTitle getHeader()
public void setLeftTitle(NFTitle leftTitle)
leftTitle - Title object representing the left titlepublic NFTitle getLeftTitle()
public void setRightTitle(NFTitle rightTitle)
rightTitle - Title object representing the right titlepublic NFTitle getRightTitle()
public void setLegend(NFLegend legend)
legend - public NFLegend getLegend()
public void setChartName(java.lang.String name)
name - public java.lang.String getChartName()
public void addNote(NFNote note,
NFNoteSet set)
note - Note to addset - NoteSet stylepublic void setNoteSeries(NFNoteSeries noteSeries)
noteSeries - To set a property on the note series, you must first
retrieve the series, then set the property (properties) and
finally set the line series.
NFBarchart chart = new NFBarchart(); // NFBarchart, NFBoxchart, etc.
NFNoteSeries ns = chart.getNoteSeries();
NFNoteSet set = (NFNoteSet)ss.elementAt(0);
// Set some of the properties on the NFNoteSet
...
ns.setElementAt(set, 0);
chart.setStockSeries(ns);
public NFNoteSeries getNoteSeries()
NFBarchart chart = new NFBarchart(); // NFBarchart, NFBoxchart, etc.
NFNoteSeries ns = chart.getNoteSeries();
NFNoteSet set = (NFNoteSet)ss.elementAt(0);
// Set some of the properties on the NFNoteSet
...
ns.setElementAt(set, 0);
chart.setStockSeries(ns);
addNote(netcharts.pro.common.NFNote, netcharts.pro.common.NFNoteSet)public void setDwellAnimationHighlight(NFFillBorder fb)
dwellAnimationHighlight - public NFFillBorder getDwellAnimationHighlight()
public void setDwellAnimation(NFDwellAnimation dwellAnimation)
dwellAnimation - A dwell animation objectpublic NFDwellAnimation getDwellAnimation()
public void setDwellAnimationStyle(int style)
If the value passed is not a valid dwell animation style, DWELL_ANIMATION_STYLE_NONE will be used.
style - One of DWELL_ANIMATION_STYLE_NONE (default) or DWELL_ANIMATION_STYLE_HIGHLIGHTpublic int getDwellAnimationStyle()
DWELL_ANIMATION_STYLE_NONE (default) or DWELL_ANIMATION_STYLE_HIGHLIGHTpublic void setLegendDwellAnimation(NFLegendDwellAnimation legendDwellAnimation)
legendDwellAnimation - A legend dwell animation objectpublic NFLegendDwellAnimation getLegendDwellAnimation()
public void setLegendDwellAnimationHighlight(NFFillBorder fb)
legenddwellAnimation - public NFFillBorder getLegendDwellAnimationHighlight()
public void setLegendDwellAnimationStyle(int style)
If the value passed is not a valid legend dwell animation style, LEGEND_DWELL_ANIMATION_STYLE_NONE will be used.
style - One of LEGEND_DWELL_ANIMATION_STYLE_NONE (default) or LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHTpublic int getLegendDwellAnimationStyle()
LEGEND_DWELL_ANIMATION_STYLE_NONE (default) or LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHTpublic void setDwell(NFDwell dwell)
dwell - public NFDwell getDwell()
public void setColorTable(NFVector colorTable)
colorTable - A list of Color objects.public NFVector getColorTable()
public void setBackgroundActiveLabel(NFActiveLabel backgroundActiveLabel)
backgroundActiveLabel - Background active label object.public NFActiveLabel getBackgroundActiveLabel()
public void setBackgroundFillPattern(NFFillPattern backgroundFillPattern)
backgroundFillPattern - public NFFillPattern getBackgroundFillPattern()
public void setSize(int width,
int height)
width - Chart width.height - Chart height.public void setSize(java.awt.Dimension chartSize)
chartSize - Chart sizepublic javax.swing.JPanel getPanel()
public javax.swing.JPanel getRootPanel()
public void setChartSize(java.awt.Dimension chartSize)
chartSize - public java.awt.Dimension getPreferredSize()
public java.awt.Dimension getMinimumSize()
public java.awt.Dimension getChartSize()
public void setAntiAlias(boolean antiAlias)
antiAlias - public void setAntiAliasMode(int antiAliasMode)
antiAliasMode - public boolean getAntiAlias()
public int getAntiAliasMode()
public void setLegendAnimationStyle(int style)
If the value passed is not a valid legend animation style, LEGEND_ANIMATION_STYLE_NONE will be used.
style - One of LEGEND_ANIMATION_STYLE_NONE (default) or LEGEND_ANIMATION_STYLE_FADEpublic int getLegendAnimationStyle()
LEGEND_ANIMATION_STYLE_NONE (default) or LEGEND_ANIMATION_STYLE_FADEpublic void setLabelAnimationStyle(int style)
If the value passed is not a valid label animation style, LABEL_ANIMATION_STYLE_NONE will be used.
style - One of LABEL_ANIMATION_STYLE_NONE (default) or LABEL_ANIMATION_STYLE_FADEpublic int getLabelAnimationStyle()
LABEL_ANIMATION_STYLE_NONE (default) or LABEL_ANIMATION_STYLE_FADEpublic void setScaleFactor(double scaleFactor)
scaleFactor - public double getScaleFactor()
public void setActiveClicks(int activeClicks)
activeClicks - public int getActiveClicks()
public void setNumberFormat(NFNumberFormat numberFormat)
numberFormat - public NFNumberFormat getNumberFormat()
public void setLocale(java.util.Locale locale)
locale - public java.util.Locale getLocale()
public void setMetaData(java.util.Hashtable metaData)
metaData - public java.util.Hashtable getMetaData()
public void setDwellOffset(int dwellOffset)
throws NFParamException
By default, DwellOffset = 20, which means the hotspot for a datapoint will be a 20 by 20 pixel square centered over the data point. Set DwellOffset to something smaller to prevent overlap between the hotspots of tightly packed datapoints. To use the default DwellOffset, set to -1. Value must be greater than or equal to 0.
dwellOffset - The offset to use to determine the hotspot size.
NFParamExceptionpublic int getDwellOffset()
public void setPlotArea(NFAreaSize plotArea)
plotArea - public NFAreaSize getPlotArea()
public void setChartElementSpacing(int chartElementSpacing)
chartElementSpacing - If < 0, then -1 (default) is used.public int getChartElementSpacing()
-1 is returned by default.public void setTitleSpacing(int titleSpacing)
titleSpacing - If < 0, then -1 (default) is used.public int getTitleSpacing()
-1 is returned by default.public void setDataActiveLabelsEnabled(boolean activeLabelsEnabled)
activeLabelsEnabled - When popups will appear over data areas of the chart.public boolean getDataActiveLabelsEnabled()
public void setToggleDataVisibility(boolean toggleDataVisibility)
toggleDataVisibility - true enable show/hide data false disable show/hide datapublic boolean getToggleDataVisibility()
true enable show/hide data false disable show/hide data
public NFFillBorder getRubberband()
public void setRubberband(NFFillBorder fb)
rubberband - public void setBuildAnimationEnabled(boolean buildAnimationEnabled)
buildAnimationEnabled - Whether build animations should be enabled in supported output formats.public boolean getBuildAnimationEnabled()
public void addChartActionListener(NFChartActionListener l)
l - the new action listenerpublic void removeChartActionListener(NFChartActionListener l)
l - the action listener to removepublic void addGraphObserver(NFGraphObserver observer)
observer - public void removeGraphObserver(NFGraphObserver observer)
observer -
public boolean dwellDisplay(boolean onoff,
netcharts.graphics.NFActiveLabel label)
dwellDisplay in interface NFDwellObserveronoff - Whether the label is to be turned on or off.label - The ActiveLabel.
public boolean dwellPress(java.awt.Event evt,
int x,
int y,
netcharts.graphics.NFActiveLabel label)
dwellPress in interface NFDwellObserverevt - The Event.x - The x coordinate of the event.y - The y coordinate of the event.label - The ActiveLabel.
public void graphDrawn(java.awt.Graphics g)
NFGraphObserver
graphDrawn in interface NFGraphObserverg - The Graphics the graph was drawn on.public void graphTooSmall(java.awt.Dimension size)
NFGraphObserver
graphTooSmall in interface NFGraphObserversize - The size the graph was given to draw itself in. This size
is minus the area for the headers, legend, etc.
public boolean preDrag(java.lang.Object obj,
double curX,
double curY,
double newX,
double newY)
NFDragObserver
preDrag in interface NFDragObserverobj - The object being dragged.curX - The current X value.curY - The current Y value.newX - The new X value.newY - The new Y value.
public void postDrag(java.lang.Object obj,
double newX,
double newY)
NFDragObserver
postDrag in interface NFDragObserverobj - The object dragged.newX - The new X value.newY - The new Y value.
public boolean preScroll(java.lang.Object obj,
double scrollMin,
double scrollMax,
double curScaleMin,
double curScaleMax,
double newScaleMin,
double newScaleMax)
NFScrollObserver
preScroll in interface NFScrollObserverobj - The object being scrolled.scrollMin - The minimum scroll value.scrollMax - The maximum scroll value.
public void postScroll(java.lang.Object obj,
double scrollMin,
double scrollMax,
double scaleMin,
double scaleMax)
NFScrollObserver
postScroll in interface NFScrollObserverobj - The object scrolled.scrollMin - The minimum scroll value.scrollMax - The maximum scroll value.scaleMin - The minimum scale value.scaleMax - The maximum scale value.public void resetState()
public void set(java.lang.Object expr)
throws NFParamException
expr - A string of CDL to set on the chart.
NFParamException
public void set(java.lang.String param,
java.lang.Object val)
throws NFParamException
The VAL object should reference data according to the type of parameter specified by PARAM.
| Parameter Type | Data Object |
| Single-Value | Raw Data Object |
| Tuple Attribute | Raw Data Object |
| Tuple Parameter | Vector of Raw Data Objects |
| Simple Vector | Vector of Raw Data Objects |
| Tuple Vector | Vector of Vector of Raw Data Objects |
The following Raw Data Objects are supported for the various attribute types:
| Attribute Type | Raw Data Objects |
| String | Any object type |
| Number | Number, String |
| Date | NFDate, NFTimeUnit, Number, String |
| Color | Color, String |
| Symbol | Number, String |
| Image | NFParamImage, Image, String |
Examples:
set ("GraphType", "HORIZONTAL");
set ("Bar3DDepth", new Integer(15));
set ("BackgroundColor", Color.red);
set ("BackgroundWidth", new Integer(5));
Vector bg = new Vector();
bg.addElement (Color.white);
bg.addElement ("BOX");
bg.addElement (new Integer(5));
set ("Background", bg);
Vector labels = new Vector();
labels.addElement ("Engr");
labels.addElement ("Sales");
labels.addElement ("Mktg");
set ("BarLabels", labels);
Vector line = new Vector();
Vector pt = new Vector();
pt.addElement (new Integer(10));
pt.addElement (new Integer(20));
line.addElement (pt);
pt = new Vector();
pt.addElement (new Float(0.5));
pt.addElement (new Double(12.45));
line.addElement (pt);
set ("LineSet1", line);
param - Parameter to set.val - New value for parameter.
NFParamException
public void set(java.lang.String param,
int itemIndex,
java.lang.Object val)
throws NFParamException
If a TUPLE parameter is specified, then the attribute with the given itemIndex will be replaced with the given data.
set ("Background", 0, Color.red);
set ("Background", 1, "BOX");
set ("Background", 2, new Integer(10));
If a SIMPLE VECTOR parameter is specified, then the vector element with the given itemIndex will be replaced by the Raw Data Object given.
set ("BarLabels", 2, "Marketing");
If a TUPLE VECTOR parameter is specified, then the entire vector tuple with the given itemIndex will be replaced by the Vector of Raw Data Objects given.
Vector pt = new Vector();
pt.addElement (new Float(13.5));
pt.addElement (new Double(10.0));
set ("LineSet1", 1, pt);
If a SINGLE VALUE parameter is specified, the itemIndex is ignored.
param - Parameter to set.itemIndex - The target index within the TUPLE or VECTORval - New value for parameter.
NFParamException
public void set(java.lang.String param,
int itemIndex,
int attrIndex,
java.lang.Object val)
throws NFParamException
The itemIndex is used to determine which tuple within the vector will be selected, and the attrIndex is used to determine which attribute within that tuple will be replaced by the Raw Data Object given.
set ("LineSet1", 2, 0, new Float(0.5));
specifies that first attribute (index = 0) of the 3rd tuple
(index = 2) in the LineSet1 vector should be changed to
a value of 0.5.
If a non-vector parameter is specified, the attrIndex is ignored.
param - The parameter to set.itemIndex - The index of the tuple to set.attrIndex - The index of the attribute within the tuple to setval - The new value.
NFParamException - if an error occurs
public void set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object val)
throws NFParamException
param - The parameter name.itemKey - The item key.val - The new value for this item.
NFParamException - if an error occurs
public void set(java.lang.String param,
java.lang.Object itemKey,
java.lang.Object attrKey,
java.lang.Object val)
throws NFParamException
param - The parameter name.itemKey - The itemKey for the parameter.attrKey - The attribute key for the itemval - The new value for this attribute of this tuple in this parameter.
NFParamException - if an error occurs
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablein - Object input stream.
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic java.lang.String getCDL()
public java.lang.String toString()
toString in class java.lang.Objectpublic void writeChart(java.lang.StringBuffer sb)
public static NFGraph getGraphFromTemplate(java.io.File template)
throws java.lang.Exception
template - The template file.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.File template,
java.util.Locale locale)
throws java.lang.Exception
template - The template file.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.File template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
throws java.lang.Exception
template - The template file.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generation.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.File template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
throws java.lang.Exception
template - The template file.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generation.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.net.URL template)
throws java.lang.Exception
template - The template URL.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.net.URL template,
java.util.Locale locale)
throws java.lang.Exception
template - The template URL.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.net.URL template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
throws java.lang.Exception
template - The template URL.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generation
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.net.URL template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
throws java.lang.Exception
template - The template URL.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generationlocale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.InputStream template)
throws java.lang.Exception
template - The template input stream.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.InputStream template,
java.util.Locale locale)
throws java.lang.Exception
template - The template input stream.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.InputStream template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
throws java.lang.Exception
template - The template input stream.documentBase - The base URL to use for chart generation.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.io.InputStream template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
throws java.lang.Exception
template - The template input stream.documentBase - The base URL to use for chart generation.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.lang.String template)
throws java.lang.Exception
template - The template parameter string.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.lang.String template,
java.util.Locale locale)
throws java.lang.Exception
template - The template parameter string.locale - The locale.
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.lang.String template,
java.lang.String documentBase,
java.util.Properties runtimeProperties)
throws java.lang.Exception
template - The template parameter string.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generation
java.lang.Exception
public static NFGraph getGraphFromTemplate(java.lang.String template,
java.lang.String documentBase,
java.util.Properties runtimeProperties,
java.util.Locale locale)
throws java.lang.Exception
template - The template parameter string.documentBase - The base URL to use for chart generation.runtimeProperties - A java.util.Properties object containing the set of runtime properties
to be used during chart generationlocale - The locale.
java.lang.Exceptionpublic static void setLicenseKey(java.lang.String key)
key - public static void setLicenseKey(byte[] key)
key - public static void setLicenseLocation(java.io.File location)
location -
public static void loadLicenseFile(java.net.URL u)
throws java.lang.Exception
java.lang.Exceptionpublic static final java.lang.String getVersion()
public static final java.lang.String getLicenseActivationKey()
public void paint(java.awt.Graphics g)
g - The Graphics to paint onto the graph instance
|
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 |