NetCharts Pro

netcharts.pro.charts.multipie
Class NFMultiPiechart

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

public class NFMultiPiechart
extends NFAbstractPiechart

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

See Also:
Serialized Form

Field Summary
static int BOTTOM
          Pie title bottom location
static int DEFAULT_PIE_MARGIN
          Pie margin default value
static int LEFT
          Pie title left location
static java.util.Hashtable pieTitleLocationMap
          Pie title location hashtable
static int RIGHT
          Pie title right location
static int TOP
          Pie title top location
 
Fields inherited from class netcharts.pro.charts.pie.NFAbstractPiechart
SLICE_ANIMATION_STYLE_FADE, SLICE_ANIMATION_STYLE_GROW, SLICE_ANIMATION_STYLE_NONE
 
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
NFMultiPiechart()
          Constructs a default chart object.
NFMultiPiechart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFMultiPiechart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel with the specified properties.
NFMultiPiechart(java.util.Properties initProperties)
          Constructs a chart object with the specified properties.
 
Method Summary
 void addPie(NFPie pie)
          Adds an NFPie object to the NFPieSeries.
 void addSliceSet(NFSliceSet sliceSet)
          Adds a slice set to the current list of slice sets.
 boolean getBestFit()
          Get the best fit layout flag.
 java.lang.String getDefaultData()
          Gets the default data - used to initialize IDE editors
 NFPieLayout getPieLayout()
          Get the pie layout object which represents how each pie is laid out in the chart.
 int getPieMargin()
          Get the margin in between each pie.
 NFPieSeries getPieSeries()
          Get the pie series.
 int getPieTitleLocation()
          Get the pie title location.
 NFSliceSeries getSliceSeries()
          Get the slice series.
 int getType()
          Gets the type of this chart.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setBestFit(boolean bestFit)
          Set the best fit layout flag.
 void setPieLayout(NFPieLayout pieLayout)
          Set the pie layout object which represents how each pie is laid out in the chart.
 void setPieMargin(int pieMargin)
          Set the margin in between each pie.
 void setPieSeries(NFPieSeries pieSeries)
          Set the pie series.
 void setPieTitleLocation(int titleLocation)
          Set the pie title location.
 void setSliceSeries(NFSliceSeries sliceSeries)
          Set the slice series.
 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.charts.pie.NFAbstractPiechart
getDataLabels, getDepth, getPieDropShadow, getPieEdgeHighlightSeries, getPieHighlightSeries, getPieSpotlightSeries, getPieSquare, getSliceAnimationStyle, getSliceBorder, getSliceColors, getSliceFillPatterns, getSliceLabel, getSliceSlideEnabled, setDataLabels, setDepth, setPieDropShadow, setPieEdgeHighlightSeries, setPieHighlightSeries, setPieSize, setPieSpotlightSeries, setPieSquare, setSliceAnimationStyle, setSliceBorder, setSliceColors, setSliceFillPatterns, setSliceLabel, setSliceSlideEnabled
 
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, 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, 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

TOP

public static final int TOP
Pie title top location


BOTTOM

public static final int BOTTOM
Pie title bottom location


LEFT

public static final int LEFT
Pie title left location


RIGHT

public static final int RIGHT
Pie title right location


DEFAULT_PIE_MARGIN

public static final int DEFAULT_PIE_MARGIN
Pie margin default value

See Also:
Constant Field Values

pieTitleLocationMap

public static java.util.Hashtable pieTitleLocationMap
Pie title location hashtable

Constructor Detail

NFMultiPiechart

public NFMultiPiechart()
Constructs a default chart object.


NFMultiPiechart

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

NFMultiPiechart

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

Parameters:
panel - Panel to draw chart on.

NFMultiPiechart

public NFMultiPiechart(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

setBestFit

public void setBestFit(boolean bestFit)
Set the best fit layout flag. If true, each pie is drawn in the largest square possible within the available space. If false, the best fit layout is not implemented.

Parameters:
bestFit - best fit layout flag

getBestFit

public boolean getBestFit()
Get the best fit layout flag. If true, each pie is drawn in the largest square possible within the available space. Otherwise, false turns this option off.

Returns:
A flag indicating if the best fit layout is implemented

setPieTitleLocation

public void setPieTitleLocation(int titleLocation)
Set the pie title location.

If the title location value is not valid, then the default value of TOP is used.

Parameters:
titleLocation - One of TOP, BOTTOM, LEFT or RIGHT

getPieTitleLocation

public int getPieTitleLocation()
Get the pie title location. Default value is TOP.

Returns:
The pie title location. One of TOP, BOTTOM, LEFT or RIGHT

setSliceSeries

public void setSliceSeries(NFSliceSeries sliceSeries)
Set the slice series. This is a vector of NFSliceSet objects. To set a property on the slice series, you must first retrieve the series, then set the property (properties) and finally set the slice series.
      NFMultiPiechart chart = new NFMultiPiechart();
      NFSliceSeries sliceSeries = chart.getSliceSeries();
      NFSliceSet set = (NFSliceSet)sliceSeries.elementAt(0);
      // Set some of the properties on the NFSliceSet
      ...
      sliceSeries.setElementAt(set, 0);
      chart.setSliceSeries(sliceSeries);
 

Parameters:
sliceSeries - slice series

getSliceSeries

public NFSliceSeries getSliceSeries()
Get the slice series. This is a vector of NFSliceSet objects.
      NFMultiPiechart chart = new NFMultiPiechart();
      NFSliceSeries sliceSeries = chart.getSliceSeries();
      NFSliceSet set = (NFSliceSet)sliceSeries.elementAt(0);
      // Set some of the properties on the NFSliceSet
      ...
      sliceSeries.setElementAt(set, 0);
      chart.setSliceSeries(sliceSeries);
 

Returns:
NFSliceSeries object

addSliceSet

public void addSliceSet(NFSliceSet sliceSet)
Adds a slice set to the current list of slice sets. The number of pies is determined by finding the slice set with the largest data set.

Parameters:
sliceSet - The slice set to add.

setPieSeries

public void setPieSeries(NFPieSeries pieSeries)
Set the pie series. This is a vector of NFPie objects which contains attributes such as pie title, pie background and pie angle. To set a property on the pie series, you must first retrieve the series, then set the property (properties) and finally set the pie series.
      NFMultiPiechart chart = new NFMultiPiechart();
      NFPieSeries pieSeries = chart.getPieSeries();
      NFPie pie = (NFPie)pieSeries.elementAt(0);
      // Set some of the properties on the NFPie
      ...
      pieSeries.setElementAt(pie, 0);
      chart.setPieSeries(pieSeries);
 

Parameters:
pieSeries - NFPieSeries object

getPieSeries

public NFPieSeries getPieSeries()
Get the pie series. This is a vector of NFPie objects which contains attributes such as pie title, pie background and pie angle. To set a property on the pie series, you must first retrieve the series, then set the property (properties) and finally set the pie series.
      NFMultiPiechart chart = new NFMultiPiechart();
      NFPieSeries pieSeries = chart.getPieSeries();
      NFPie pie = (NFPie)pieSeries.elementAt(0);
      // Set some of the properties on the NFPie
      ...
      pieSeries.setElementAt(pie, 0);
      chart.setPieSeries(pieSeries);
 

Returns:
NFPieSeries object

addPie

public void addPie(NFPie pie)
Adds an NFPie object to the NFPieSeries. The NFPie object contains attributes such as pie title, pie background and pie angle.

Parameters:
pie - The NFPie object to add.

setPieLayout

public void setPieLayout(NFPieLayout pieLayout)
Set the pie layout object which represents how each pie is laid out in the chart.

Parameters:
pieLayout - the pie layout object

getPieLayout

public NFPieLayout getPieLayout()
Get the pie layout object which represents how each pie is laid out in the chart.

Returns:
pie layout object

setPieMargin

public void setPieMargin(int pieMargin)
Set the margin in between each pie.

If the pie margin value is less than 0, then DEFAULT_PIE_MARGIN will be used.

Parameters:
pieMargin - pie margin

getPieMargin

public int getPieMargin()
Get the margin in between each pie.

Returns:
pie margin

getDefaultData

public java.lang.String getDefaultData()
Gets the default data - used to initialize IDE editors

Specified by:
getDefaultData in class NFGraph
Returns:
defaultData

getType

public int getType()
Gets the type of this chart.

Specified by:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.common.NFGraph.MULTIPIE

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 NFAbstractPiechart
Throws:
java.io.IOException

writeChart

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

Overrides:
writeChart in class NFAbstractPiechart

resetState

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

Overrides:
resetState in class NFAbstractPiechart

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