NetCharts Pro

netcharts.pro.charts.pie
Class NFPiechart

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

public class NFPiechart
extends NFGraph

Piechart object. 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
BAR, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, LINE, PIE, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFPiechart()
          Constructs a default chart object.
NFPiechart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFPiechart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFPiechart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 NFVector getActiveLabels()
          Get active labels
 int getAngle()
          Get starting angle
 NFVector getDataLabels()
          Get data labels
 NFVector getDataSet()
          Get data set
 java.lang.String getDefaultData()
          Gets the default data - used to initialize IDE editors
 int getDepth()
          Get 3DDepth
 int getMaxHeight()
          Gets the maximum height of the Piechart.
 int getMaxWidth()
          Gets the maximum width of the Piechart.
 int getMinHeight()
          Gets the minimum height of the Piechart.
 int getMinWidth()
          Gets the minimum width of the Piechart.
 boolean getPieSquare()
          Get pie square
 NFLine getSliceBorder()
          Get sliceBorder for this pie chart
 NFVector getSliceColors()
          Get slice colors
 NFVector getSliceFillPatterns()
          Get slice fill patterns
 NFSliceLabel getSliceLabel()
          Get sliceLabel object for this pie chart
 NFVector getSlicePos()
          Get slice positions
 int getType()
          Gets the type of this chart.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setActiveLabels(NFVector activeLabels)
          Set active labels
 void setAngle(int angle)
          Set starting angle
 void setDataLabels(NFVector dataLabels)
          Set data labels
 void setDataSet(NFVector dataSet)
          Set data set
 void setDepth(int depth)
          Set 3DDepth
 void setMaxHeight(int maxHeight)
          Set the maximum height of the Piechart.
 void setMaxWidth(int maxWidth)
          Set the maximum width of the Piechart.
 void setMinHeight(int minHeight)
          Set the minimum height of the Piechart.
 void setMinWidth(int minWidth)
          Set the minimum width of the Piechart.
 void setPieSize(int minWidth, int minHeight, int maxWidth, int maxHeight)
          Set the minimum and maximum size of the Piechart.
 void setPieSquare(boolean pieSquare)
          Set pie square
 void setSliceBorder(NFLine sliceBorder)
          Set border for this pie chart
 void setSliceColors(NFVector sliceColors)
          Set slice colors
 void setSliceFillPatterns(NFVector sliceFillPatterns)
          Set slice fill patterns
 void setSliceLabel(NFSliceLabel label)
          Set sliceLabel object for this pie chart
 void setSlicePos(NFVector slicePos)
          Set slice positions
 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, 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, 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

NFPiechart

public NFPiechart()
Constructs a default chart object.

NFPiechart

public NFPiechart(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.

NFPiechart

public NFPiechart(javax.swing.JPanel panel)
Constructs a chart object on the given JPanel.
Parameters:
panel - Panel to draw chart on.

NFPiechart

public NFPiechart(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.
Method Detail

setMinWidth

public void setMinWidth(int minWidth)
                 throws NFParamException
Set the minimum width of the Piechart. To specify no minimum width, set to -1. Value must be greater than or equal to 0 and less than the maximum if configured.
Parameters:
minWidth -  

getMinWidth

public int getMinWidth()
                throws NFParamException
Gets the minimum width of the Piechart. If no minimum width has been specified, returns -1.
Returns:
Minimum width of the Piechart

setMinHeight

public void setMinHeight(int minHeight)
                  throws NFParamException
Set the minimum height of the Piechart. To specify no minimum height, set to -1. Value must be greater than or equal to 0 and less than the maximum if configured.
Parameters:
minHeight -  

getMinHeight

public int getMinHeight()
Gets the minimum height of the Piechart. If no minimum height has been specified, returns -1.
Returns:
Minimum height of the Piechart

setMaxHeight

public void setMaxHeight(int maxHeight)
                  throws NFParamException
Set the maximum height of the Piechart. To specify no maximum height, set to -1. Value must be greater than or equal to 0 or the minimum height if configured.
Parameters:
maxHeight -  

getMaxHeight

public int getMaxHeight()
Gets the maximum height of the Piechart. If no maximum height has been specified, returns -1.
Returns:
Maximum height of the Piechart

setMaxWidth

public void setMaxWidth(int maxWidth)
                 throws NFParamException
Set the maximum width of the Piechart. To specify no maximum width, set to -1. Value must be greater than or equal to 0 or the minimum width if configured.
Parameters:
maxHeight -  

getMaxWidth

public int getMaxWidth()
Gets the maximum width of the Piechart. If no maximum width has been specified, returns -1.
Returns:
Maximum width of the Piechart

setPieSize

public void setPieSize(int minWidth,
                       int minHeight,
                       int maxWidth,
                       int maxHeight)
                throws NFParamException
Set the minimum and maximum size of the Piechart. To specify no value, set to -1.
Parameters:
minWidth - The minimum width of the Piechart.
minHeight - The minimum height of the Piechart.
maxWidth - The maximum width of the Piechart.
maxHeight - The maximum height of the Piechart.

setSliceLabel

public void setSliceLabel(NFSliceLabel label)
Set sliceLabel object for this pie chart
Parameters:
label - Contains several elements that characterize how slice labels should be shown.

getSliceLabel

public NFSliceLabel getSliceLabel()
Get sliceLabel object for this pie chart
Returns:
label Contains several elements that characterize how slice labels should be shown.

setSliceBorder

public void setSliceBorder(NFLine sliceBorder)
Set border for this pie chart
Parameters:
sliceBorder - The line style to use for slice border lines

getSliceBorder

public NFLine getSliceBorder()
Get sliceBorder for this pie chart
Returns:
sliceBorder The line style to use for slice border lines

setDepth

public void setDepth(int depth)
Set 3DDepth
Parameters:
depth - 3D shadow depth

getDepth

public int getDepth()
Get 3DDepth
Returns:
depth 3D shadow depth

setAngle

public void setAngle(int angle)
Set starting angle
Parameters:
angle - In degrees 0-359

getAngle

public int getAngle()
Get starting angle
Returns:
angle In degrees 0-359

setPieSquare

public void setPieSquare(boolean pieSquare)
Set pie square
Parameters:
pieSquare - When true, the pie will always have a consistent width and height. When false, the pie will attempt to use all available width and height

getPieSquare

public boolean getPieSquare()
Get pie square
Returns:
pieSquare When true, the pie will always have a consistent width and height. When false, the pie will attempt to use all available width and height

setDataSet

public void setDataSet(NFVector dataSet)
                throws NFParamException
Set data set
Parameters:
input - A NFVector of numeric data

getDataSet

public NFVector getDataSet()
Get data set
Returns:
vector A NFVector of numeric data

setDataLabels

public void setDataLabels(NFVector dataLabels)
                   throws NFParamException
Set data labels
Parameters:
input - A NFVector of string labels corresponding to each slice

getDataLabels

public NFVector getDataLabels()
Get data labels
Returns:
vector A NFVector of string labels corresponding to each slice

setSlicePos

public void setSlicePos(NFVector slicePos)
                 throws NFParamException
Set slice positions
Parameters:
input - A NFVector of numeric values corresponding to each slice position.

getSlicePos

public NFVector getSlicePos()
Get slice positions
Returns:
vector A NFVector of numeric values corresponding to each slice position.

setActiveLabels

public void setActiveLabels(NFVector activeLabels)
                     throws NFParamException
Set active labels
Parameters:
input - A NFVector of NFActiveLabels corresponding to each slice.

getActiveLabels

public NFVector getActiveLabels()
Get active labels
Returns:
input A NFVector of NFActiveLabels corresponding to each slice.

setSliceFillPatterns

public void setSliceFillPatterns(NFVector sliceFillPatterns)
                          throws NFParamException
Set slice fill patterns
Parameters:
input - A NFVector of NFFillPatterns corresponding to each slice.

getSliceFillPatterns

public NFVector getSliceFillPatterns()
Get slice fill patterns
Parameters:
input - A NFVector of NFFillPatterns corresponding to each slice.

setSliceColors

public void setSliceColors(NFVector sliceColors)
                    throws NFParamException
Set slice colors
Parameters:
input - A NFVector of Color objects corresponding to each slice.

getSliceColors

public NFVector getSliceColors()
Get slice colors
Returns:
input A NFVector of Color objects corresponding to each slice.

getDefaultData

public java.lang.String getDefaultData()
Gets the default data - used to initialize IDE editors
Overrides:
getDefaultData in class NFGraph
Returns:
defaultData

getType

public int getType()
Gets the type of this chart.
Overrides:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.charts.pie.NFGraph.PIE

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 - 2004
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: Apr 1, 2004