NetCharts Pro

netcharts.pro.charts.diagram
Class NFDiagramchart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.charts.diagram.NFDiagramchart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver

public class NFDiagramchart
extends NFGraph

Represents a diagram or map chart. Provides the ability to configure the chart via object manipulation or directly from CDL.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class netcharts.pro.common.NFGraph
ANTIALIAS_OFF, ANTIALIAS_ON, ANTIALIAS_ONDRAW, ANTIALIAS_ONTEXT, antiAliasModeMap, BAR, BAR3D, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, DWELL_ANIMATION_STYLE_HIGHLIGHT, DWELL_ANIMATION_STYLE_NONE, FADE, HEATMAP, HIGHLIGHT, HISTOGRAM, LABEL_ANIMATION_STYLE_FADE, LABEL_ANIMATION_STYLE_NONE, LEGEND_ANIMATION_STYLE_FADE, LEGEND_ANIMATION_STYLE_NONE, LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT, LEGEND_DWELL_ANIMATION_STYLE_NONE, LINE, MULTIPIE, PARETO, PIE, POLAR, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFDiagramchart()
          Constructs a default chart object.
NFDiagramchart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFDiagramchart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFDiagramchart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 void addEdge(NFNodeEdge edge)
          Adds a diagram edge.
 void addEdge(java.lang.String startNode, java.lang.String endNode)
          Adds a diagram edge connecting the named start and end nodes.
 void addEmptyNode(java.lang.String nodeName, int x, int y)
          Adds an empty diagram node
 void addExpression(int operator, java.lang.Object value1, java.lang.Object value2, java.awt.Color fillColor)
          Adds a expression.
 void addExpression(NFPolyExpr expr)
          Adds a expression.
 void addNode(java.lang.String text, int x, int y)
          Adds a diagram node
 void addNode(java.lang.String text, int x, int y, NFTextStyle style, NFRegion region)
          Adds a diagram node
 void addNode(java.lang.String nodeName, java.lang.String text, int x, int y, NFTextStyle style, NFRegion region)
          Adds a diagram node
 void addPolygon(NFPoly poly)
          Adds a polygon to the set of polygons.
 void addPolygon(java.lang.String tagName, java.awt.Polygon polygon, java.awt.Color fillColor)
          Adds a polygon
 boolean getAppendPolyDayaToActiveLabels()
          Get whether poly data should be appended to the poly active labels text.
 java.lang.String getDefaultData()
          Returns a string of default data
 NFNodeEdgeSeries getEdges()
          Gets the list of edges.
 NFVector getExpressions()
          Gets the list of expressions.
 NFFillBorder getLegendDwellAnimationHighlight()
          The legend dwell animation highlight is not supported.
 int getLegendDwellAnimationStyle()
          Legend dwell animation style is not supported.
 NFNodeSeries getNodes()
          Gets the list of nodes.
 NFPolySet getPolygons()
          Gets the list of polygons.
 boolean getToggleDataVisibility()
          Toggle data visibility is not supported.
 int getType()
          Gets the chart type.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setAppendPolyDayaToActiveLabels(boolean appendPolyDataToActiveLabels)
          Set whether poly data should be appended to the poly active labels text.
 void setEdges(NFNodeEdgeSeries edges)
          Sets the list of edges.
 void setExpressions(NFVector exprs)
          Sets the list of expressions.
 void setLegendDwellAnimationHighlight(NFFillBorder fb)
          The legend dwell animation highlight is not supported.
 void setLegendDwellAnimationStyle(int style)
          Legend dwell animation style is not supported.
 void setNodes(NFNodeSeries nodes)
          Sets the list of nodes.
 void setPolygons(NFPolySet polygons)
          Sets the list of polygons.
 void setToggleDataVisibility(boolean toggleDataVisibility)
          Toggle data visibility is not supported.
 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 netcharts.pro.common.NFGraph
addChartActionListener, addGraphObserver, addNote, addPropertyChangeListener, display, dwellDisplay, dwellPress, finalize, getActiveClicks, getAlwaysUpdate, getAntiAlias, getAntiAliasMode, getBackgroundActiveLabel, getBackgroundFillPattern, getBackgroundRegion, getBuildAnimationEnabled, getCDL, getChartElementSpacing, getChartName, getChartSize, getColorTable, getDataActiveLabelsEnabled, getDwell, getDwellAnimation, getDwellAnimationHighlight, getDwellAnimationStyle, getDwellOffset, getErrors, getFooter, getGraph, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLabelAnimationStyle, getLeftTitle, getLegend, getLegendAnimationStyle, getLegendDwellAnimation, getLicenseActivationKey, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getRubberband, getScaleFactor, getTitleSpacing, getVersion, graphDrawn, graphTooSmall, initializeFromFile, initializeFromString, initializeFromURL, loadFromTemplate, loadFromTemplate, loadFromTemplate, loadLicenseFile, paint, postDrag, postScroll, preDrag, preScroll, readExternal, removeChartActionListener, removeGraphObserver, removePropertyChangeListener, sendData, sendData, sendData, sendData, sendUpdate, set, set, set, set, set, set, setActiveClicks, setAlwaysUpdate, setAntiAlias, setAntiAliasMode, setBackgroundActiveLabel, setBackgroundFillPattern, setBackgroundRegion, setBuildAnimationEnabled, setChartElementSpacing, setChartName, setChartSize, setColorTable, setDataActiveLabelsEnabled, setDocumentBase, setDwell, setDwellAnimation, setDwellAnimationHighlight, setDwellAnimationStyle, setDwellOffset, setFooter, setHeader, setLabelAnimationStyle, setLeftTitle, setLegend, setLegendAnimationStyle, setLegendDwellAnimation, setLicenseKey, setLicenseKey, setLicenseLocation, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setRubberband, setScaleFactor, setSize, setSize, setTitleSpacing, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFDiagramchart

public NFDiagramchart()
Constructs a default chart object.


NFDiagramchart

public NFDiagramchart(javax.swing.JPanel panel)
Constructs a chart object on the given JPanel.

Parameters:
panel - Panel to draw chart on.

NFDiagramchart

public NFDiagramchart(java.util.Properties initProperties)
Constructs a chart object on the given JPanel.

Parameters:
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.

NFDiagramchart

public NFDiagramchart(javax.swing.JPanel panel,
                      java.util.Properties initProperties)
Constructs a chart object on the given JPanel.

Parameters:
panel - Panel to draw chart on.
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.
Method Detail

getDefaultData

public java.lang.String getDefaultData()
Returns a string of default data

Specified by:
getDefaultData in class NFGraph
Returns:
The default data used to initialize a chart.

addNode

public void addNode(java.lang.String text,
                    int x,
                    int y,
                    NFTextStyle style,
                    NFRegion region)
Adds a diagram node

Parameters:
text - The text to show on the node.
x - The x position of the node.
y - The y position of the node
style - The text style
region - The background style.

addNode

public void addNode(java.lang.String nodeName,
                    java.lang.String text,
                    int x,
                    int y,
                    NFTextStyle style,
                    NFRegion region)
Adds a diagram node

Parameters:
nodeName - Node name to be used when attaching edges
text - The text to show on the node.
x - The x position of the node.
y - The y position of the node
style - The text style
region - The background style.

addEmptyNode

public void addEmptyNode(java.lang.String nodeName,
                         int x,
                         int y)
Adds an empty diagram node

Parameters:
nodeName - Node name to be used when attaching edges
x - The x position of the node.
y - The y position of the node

addNode

public void addNode(java.lang.String text,
                    int x,
                    int y)
Adds a diagram node

Parameters:
text - The text to show on the node.
x - The x position of the node.
y - The y position of the node

setNodes

public void setNodes(NFNodeSeries nodes)
Sets the list of nodes. Will override any previous addNode calls.

Parameters:
nodes - List of nodes.

getNodes

public NFNodeSeries getNodes()
Gets the list of nodes.

Parameters:
return - the list of diagram nodes

addEdge

public void addEdge(java.lang.String startNode,
                    java.lang.String endNode)
Adds a diagram edge connecting the named start and end nodes.

Parameters:
startNode - Name of the start node
endNode - Name of the end node

addEdge

public void addEdge(NFNodeEdge edge)
Adds a diagram edge.

Parameters:
edge - The edge to add.

setEdges

public void setEdges(NFNodeEdgeSeries edges)
Sets the list of edges. Will override any previous addEdge calls.

Parameters:
edges - List of edges.

getEdges

public NFNodeEdgeSeries getEdges()
Gets the list of edges.

Returns:
the list of edges.

addPolygon

public void addPolygon(java.lang.String tagName,
                       java.awt.Polygon polygon,
                       java.awt.Color fillColor)
Adds a polygon

Parameters:
tagName - Name of the polygon
polygon - Polygon object
fillColor - color to use for the polygon

addPolygon

public void addPolygon(NFPoly poly)
Adds a polygon to the set of polygons.

Parameters:
poly - The NFPoly to add.

setPolygons

public void setPolygons(NFPolySet polygons)
Sets the list of polygons. Will override any addPolygon calls

Parameters:
polygons - List of polygons.

getPolygons

public NFPolySet getPolygons()
Gets the list of polygons.

Returns:
the list of polygons.

addExpression

public void addExpression(int operator,
                          java.lang.Object value1,
                          java.lang.Object value2,
                          java.awt.Color fillColor)
Adds a expression. The expression is used to color polygons based on a given condition. It is used in conjunction with the data in the NFPoly object. Elements from the NFPoly object are compared with the values in the expression. If the expression is true, the polygon is colored with the expression fill color.

Parameters:
int - operator
Object - value1
Object - value2
fillColor - color to use if a match is found

addExpression

public void addExpression(NFPolyExpr expr)
Adds a expression. The expression is used to color polygons based on a given condition. It is used in conjunction with the data in the NFPoly object. Elements from the NFPoly object are compared with the values in the expression. If the expression is true, the polygon is colored with the expression fill color.

Parameters:
expr - The expression to add.

setExpressions

public void setExpressions(NFVector exprs)
Sets the list of expressions. Will override any addExpression calls

Parameters:
exprs - Vector of NFPolyExpr objects.

getExpressions

public NFVector getExpressions()
Gets the list of expressions.

Returns:
a vector of NFPolyExpr object.

getType

public int getType()
Gets the chart type.

Specified by:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.charts.diagram.NFGraph.BAR

setLegendDwellAnimationStyle

public void setLegendDwellAnimationStyle(int style)
Legend dwell animation style is not supported. The style will be ignored.

Overrides:
setLegendDwellAnimationStyle in class NFGraph
Parameters:
style - One of LEGEND_DWELL_ANIMATION_STYLE_NONE (default) or LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT

getLegendDwellAnimationStyle

public int getLegendDwellAnimationStyle()
Legend dwell animation style is not supported.

Overrides:
getLegendDwellAnimationStyle in class NFGraph
Returns:
LEGEND_DWELL_ANIMATION_STYLE_NONE

setLegendDwellAnimationHighlight

public void setLegendDwellAnimationHighlight(NFFillBorder fb)
The legend dwell animation highlight is not supported. The highlight will be ignored.

Overrides:
setLegendDwellAnimationHighlight in class NFGraph

getLegendDwellAnimationHighlight

public NFFillBorder getLegendDwellAnimationHighlight()
The legend dwell animation highlight is not supported.

Overrides:
getLegendDwellAnimationHighlight in class NFGraph
Returns:
null

setToggleDataVisibility

public void setToggleDataVisibility(boolean toggleDataVisibility)
Toggle data visibility is not supported. The toggleDataVisibility flag will be ignored.

Overrides:
setToggleDataVisibility in class NFGraph
Parameters:
toggleDataVisibility - true enable show/hide data false disable show/hide data

getToggleDataVisibility

public boolean getToggleDataVisibility()
Toggle data visibility is not supported. Returns false

Overrides:
getToggleDataVisibility in class NFGraph

setAppendPolyDayaToActiveLabels

public void setAppendPolyDayaToActiveLabels(boolean appendPolyDataToActiveLabels)
Set whether poly data should be appended to the poly active labels text.

Parameters:
appendPolyDataToActiveLabels - Whether poly data should be appended to the poly active labels text.

getAppendPolyDayaToActiveLabels

public boolean getAppendPolyDayaToActiveLabels()
Get whether poly data should be appended to the poly active labels text.

Returns:
appendPolyDataToActiveLabels Whether poly data should be appended to the poly active labels text.

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Writes this chart into an object for serialization.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class NFGraph
Throws:
java.io.IOException

writeChart

public void writeChart(java.lang.StringBuffer sb)
Writes this chart into a string buffer

Overrides:
writeChart in class NFGraph

resetState

public void resetState()
Resets all of the parameter values to their initial state.

Overrides:
resetState in class NFGraph

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011