NetCharts Pro

netcharts.pro.charts.diagram
Class NFDiagramchart

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

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

Fields inherited from class netcharts.pro.common.NFGraph
ANTIALIAS_OFF, ANTIALIAS_ON, ANTIALIAS_ONDRAW, ANTIALIAS_ONTEXT, antiAliasModeMap, BAR, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, LINE, 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
 java.lang.String getDefaultData()
          Returns a string of default data
 NFNodeEdgeSeries getEdges()
          Gets the list of edges.
 NFVector getExpressions()
          Gets the list of expressions.
 NFNodeSeries getNodes()
          Gets the list of nodes.
 NFPolySet getPolygons()
          Gets the list of polygons.
 int getType()
          Gets the chart type.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setEdges(NFNodeEdgeSeries edges)
          Sets the list of edges.
 void setExpressions(NFVector exprs)
          Sets the list of expressions.
 void setNodes(NFNodeSeries nodes)
          Sets the list of nodes.
 void setPolygons(NFPolySet polygons)
          Sets the list of polygons.
 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, getBackgroundFillPattern, getBackgroundRegion, getCDL, getChartElementSpacing, getChartName, getChartSize, getColorTable, getDataActiveLabelsEnabled, getDwell, getDwellOffset, getErrors, getFooter, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLeftTitle, getLegend, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getScaleFactor, 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, setBackgroundFillPattern, setBackgroundRegion, setChartElementSpacing, setChartName, setChartSize, setColorTable, setDataActiveLabelsEnabled, setDocumentBase, setDwell, setDwellOffset, setFooter, setHeader, setLeftTitle, setLegend, setLicenseKey, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setScaleFactor, setSize, setSize, 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
Overrides:
getDefaultData in class NFGraph
Following copied from class: netcharts.pro.common.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.
Overrides:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.charts.diagram.NFGraph.BAR

writeExternal

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

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.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2005
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: Feb 1, 2005