NetCharts Pro

netcharts.pro.charts.pie
Class NFAbstractPiechart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.common.circular.NFSizedChart
          extended by netcharts.pro.charts.pie.NFAbstractPiechart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver
Direct Known Subclasses:
NFMultiPiechart, NFPiechart

public abstract class NFAbstractPiechart
extends NFSizedChart

Represents an abstract pie chart. Provides the ability to configure the chart via object manipulation or directly from CDL.

See Also:
Serialized Form

Field Summary
static int SLICE_ANIMATION_STYLE_FADE
          Slice animation style fade
static int SLICE_ANIMATION_STYLE_GROW
          Slice animation style grow
static int SLICE_ANIMATION_STYLE_NONE
          No slice animation style
 
Fields inherited from class netcharts.pro.common.circular.NFSizedChart
SIZE_MAX_HEIGHT_DEFAULT, SIZE_MAX_WIDTH_DEFAULT, SIZE_MIN_HEIGHT_DEFAULT, SIZE_MIN_WIDTH_DEFAULT
 
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
NFAbstractPiechart()
          Constructs a default chart object.
NFAbstractPiechart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFAbstractPiechart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel with the specified properties.
NFAbstractPiechart(java.util.Properties initProperties)
          Constructs a chart object with the specified properties.
 
Method Summary
 NFVector getDataLabels()
          Get data labels
 int getDepth()
          Get 3DDepth
 NFDropShadow getPieDropShadow()
          Get the drop shadow for the pie
 NFPieEdgeHighlightSeries getPieEdgeHighlightSeries()
          Get the pie edge highlight series.
 NFPieHighlightSeries getPieHighlightSeries()
          Get the pie highlight series.
 NFSpotlightSeries getPieSpotlightSeries()
          Get the pie spotlight series.
 boolean getPieSquare()
          Get pie square
 int getSliceAnimationStyle()
          Get the slice animation style.
 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
 boolean getSliceSlideEnabled()
          Returns whether a pie slice will slide out when clicking on it true enable slice slide false disable slice slide
 void resetState()
          Resets all of the parameter values to their initial state.
 void setDataLabels(NFVector dataLabels)
          Set data labels
 void setDepth(int depth)
          Set 3DDepth
 void setPieDropShadow(NFDropShadow pieDropShadow)
          Set the drop shadow for the pie
 void setPieEdgeHighlightSeries(NFPieEdgeHighlightSeries pieEdgeHighlightSeries)
          Set the pie edge highlight series.
 void setPieHighlightSeries(NFPieHighlightSeries pieHighlightSeries)
          Set the pie highlight series.
 void setPieSize(int minWidth, int minHeight, int maxWidth, int maxHeight)
          Set the minimum and maximum size of the Piechart.
 void setPieSpotlightSeries(NFSpotlightSeries pieSpotlightSeries)
          Set the pie spotlight series.
 void setPieSquare(boolean pieSquare)
          Set pie square
 void setSliceAnimationStyle(int style)
          Set the slice animation style.
 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 setSliceSlideEnabled(boolean sliceSlideEnabled)
          Sets whether a pie slice will slide out when clicking on it
 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.circular.NFSizedChart
getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth
 
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, getDefaultData, getDwell, getDwellAnimation, getDwellAnimationHighlight, getDwellAnimationStyle, getDwellOffset, getErrors, getFooter, getGraph, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLabelAnimationStyle, getLeftTitle, getLegend, getLegendAnimationStyle, getLegendDwellAnimation, getLegendDwellAnimationHighlight, getLegendDwellAnimationStyle, getLicenseActivationKey, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getRubberband, getScaleFactor, getTitleSpacing, getToggleDataVisibility, getType, 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, setLegendDwellAnimationHighlight, setLegendDwellAnimationStyle, setLicenseKey, setLicenseKey, setLicenseLocation, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setRubberband, setScaleFactor, setSize, setSize, setTitleSpacing, setToggleDataVisibility, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SLICE_ANIMATION_STYLE_NONE

public static final int SLICE_ANIMATION_STYLE_NONE
No slice animation style

See Also:
Constant Field Values

SLICE_ANIMATION_STYLE_GROW

public static final int SLICE_ANIMATION_STYLE_GROW
Slice animation style grow

See Also:
Constant Field Values

SLICE_ANIMATION_STYLE_FADE

public static final int SLICE_ANIMATION_STYLE_FADE
Slice animation style fade

See Also:
Constant Field Values
Constructor Detail

NFAbstractPiechart

public NFAbstractPiechart()
Constructs a default chart object.


NFAbstractPiechart

public NFAbstractPiechart(java.util.Properties initProperties)
Constructs a chart object with the specified properties.

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.

NFAbstractPiechart

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

Parameters:
panel - Panel to draw chart on.

NFAbstractPiechart

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

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

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.
Throws:
NFParamException

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

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

setSliceFillPatterns

public void setSliceFillPatterns(NFVector sliceFillPatterns)
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)
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.

setDataLabels

public void setDataLabels(NFVector dataLabels)
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

setPieHighlightSeries

public void setPieHighlightSeries(NFPieHighlightSeries pieHighlightSeries)
Set the pie highlight series.

Parameters:
pieHighlightSeries - The series of pie highlights

getPieHighlightSeries

public NFPieHighlightSeries getPieHighlightSeries()
Get the pie highlight series.

Returns:
The series of pie highlights

setPieSpotlightSeries

public void setPieSpotlightSeries(NFSpotlightSeries pieSpotlightSeries)
Set the pie spotlight series.

Parameters:
pieSpotlightSeries - The series of pie spotlights

getPieSpotlightSeries

public NFSpotlightSeries getPieSpotlightSeries()
Get the pie spotlight series.

Returns:
The series of pie spotlights

setPieDropShadow

public void setPieDropShadow(NFDropShadow pieDropShadow)
Set the drop shadow for the pie

Parameters:
pieDropShadow - The drop shadow to use under the pie

getPieDropShadow

public NFDropShadow getPieDropShadow()
Get the drop shadow for the pie

Returns:
The drop shadow to use under the pie

setPieEdgeHighlightSeries

public void setPieEdgeHighlightSeries(NFPieEdgeHighlightSeries pieEdgeHighlightSeries)
Set the pie edge highlight series.

Parameters:
pieEdgeHighlightSeries - The series of pie edge highlights

getPieEdgeHighlightSeries

public NFPieEdgeHighlightSeries getPieEdgeHighlightSeries()
Get the pie edge highlight series.

Returns:
The series of pie edge highlights

setSliceAnimationStyle

public void setSliceAnimationStyle(int style)
Set the slice animation style.

If the value passed is not a valid slice animation style, SLICE_ANIMATION_STYLE_NONE will be used.

Parameters:
style - One of SLICE_ANIMATION_STYLE_NONE (default), SLICE_ANIMATION_STYLE_GROW or SLICE_ANIMATION_STYLE_FADE

getSliceAnimationStyle

public int getSliceAnimationStyle()
Get the slice animation style.

Returns:
type One of SLICE_ANIMATION_STYLE_NONE (default), SLICE_ANIMATION_STYLE_GROW or SLICE_ANIMATION_STYLE_FADE

setSliceSlideEnabled

public void setSliceSlideEnabled(boolean sliceSlideEnabled)
Sets whether a pie slice will slide out when clicking on it

Parameters:
sliceSlideEnabled - true enable slice slide false disable slice slide

getSliceSlideEnabled

public boolean getSliceSlideEnabled()
Returns whether a pie slice will slide out when clicking on it true enable slice slide false disable slice slide


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 NFSizedChart

resetState

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

Overrides:
resetState in class NFSizedChart

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