NetCharts Pro

netcharts.pro.common.barset
Class NFAbstractBarchart

java.lang.Object
  |
  +--netcharts.pro.common.NFGraph
        |
        +--netcharts.pro.common.zoomable.NFZoomableChart
              |
              +--netcharts.pro.common.rectangular.NFDataChart
                    |
                    +--netcharts.pro.common.barset.NFAbstractBarchart
All Implemented Interfaces:
java.io.Externalizable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver, java.io.Serializable
Direct Known Subclasses:
NFBarchart, NFParetochart

public abstract class NFAbstractBarchart
extends NFDataChart

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

See Also:
Serialized Form

Field Summary
static java.util.Hashtable barchartTypeMap
          barchart type hashtable
static int BOTTOMUP
          Stack bar sets from the bottom up when barchart type is stack
static int GROUP
          Group barchart type
static int GROUPSTACK
          Stacked/Grouped barchart type
static int HORIZONTAL
          Horizontal orientation
static int ITEM
          Discrete value shown on popup when barchart type is stack
static java.util.Hashtable orientationMap
          orientation hashtable
static int ROWS
          Row barchart type
static int STACK
          Stacked barchart type
static java.util.Hashtable stackDisplayOrderMap
          stack display order hashtable
static java.util.Hashtable stackTypeMap
          barchart stack type hashtable
static int TOPDOWN
          Stack bar sets from the top down when barchart type is stack
static int TOTAL
          Total value shown on popup when barchart type is stack
static int VERTICAL
          Vertical orientation
 
Fields inherited from class netcharts.pro.common.zoomable.NFZoomableChart
NOZOOM, zoomActionsMap, ZOOMIN, ZOOMOUT
 
Fields inherited from class netcharts.pro.common.NFGraph
ANTIALIAS_OFF, ANTIALIAS_ON, ANTIALIAS_ONDRAW, ANTIALIAS_ONTEXT, antiAliasModeMap, BAR, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, HEATMAP, LINE, MULTIPIE, PARETO, PIE, POLAR, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFAbstractBarchart()
          Constructs a default chart object.
NFAbstractBarchart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFAbstractBarchart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel with the specified properties.
NFAbstractBarchart(java.util.Properties initProperties)
          Constructs a chart object with the specified properties.
 
Method Summary
 void addBarSet(NFBarSet barSet)
          Adds a bar set to the current list of barsets.
 NFVector getBarActiveLabels()
          Get active labels to be associated with each data label.
 NFLine getBarBorder()
          Returns the bar border for this bar chart
 NFBarSeries getBarSeries()
          Get the bar series.
 NFModalLabel getBarValueLabel()
          Get the text style to use for labeling bars in this barset.
 NFRegion getBarValueLabelRegion()
          Get the text background style to use for labeling bars in this barset.
 int getBarWidth()
          Get bar width.
 NFVector getDataLabels()
          Get the labels to be displayed under each bar.
 int getStackDisplayOrder()
          Get barchart stack display order, either BOTTOMUP or TOPDOWN.
 int getStackType()
          Get barchart stack type, either TOTAL or ITEM.
 NFModalLabel getZAxisLabels()
          Returns the text style and value to use for labeling the Z Axis.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setBarActiveLabels(NFVector barActiveLabels)
          Set active labels to be associated with each data label.
 void setBarBorder(NFLine barBorder)
          Set border for this bar chart
 void setBarSeries(NFBarSeries barSeries)
          Set the bar series.
 void setBarValueLabel(NFModalLabel barValueLabel)
          Set the text style to use for labeling bars in this barset.
 void setBarValueLabelRegion(NFRegion barValueRegion)
          Set the text background style to use for labeling bars in this barset.
 void setBarWidth(int barWidth)
          Set bar width.
 void setDataLabels(NFVector dataLabels)
          Set the labels to be displayed under each bar.
 void setStackDisplayOrder(int stackDisplayOrder)
          Set barchart stack display order, either BOTTOMUP or TOPDOWN.
 void setStackType(int stackType)
          Set barchart stack type, either TOTAL or ITEM.
 void setZAxisLabels(NFModalLabel zAxisLabel)
          Set the text style and value to use for labeling the Z Axis.
 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.rectangular.NFDataChart
addGrid, getAutoscalePad, getAxesSizes, getAxisThickness, getBottomAxis, getBottomAxisSeries, getGrid, getGridDepth, getGridSeries, getLeftAxis, getLeftAxisSeries, getRightAxis, getRightAxisSeries, getTopAxis, getTopAxisSeries, setAutoscalePad, setAxesSizes, setAxisThickness, setBottomAxis, setBottomAxisSeries, setGrid, setGridDepth, setGridSeries, setLeftAxis, setLeftAxisSeries, setRightAxis, setRightAxisSeries, setTopAxis, setTopAxisSeries
 
Methods inherited from class netcharts.pro.common.zoomable.NFZoomableChart
getMouseControlDown, getMouseMetaDown, getMouseShiftDown, getZoomingEnabled, setMouseControlDown, setMouseMetaDown, setMouseShiftDown, setZoomingEnabled
 
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, getDefaultData, 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, getType, 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
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
Horizontal orientation

VERTICAL

public static final int VERTICAL
Vertical orientation

ROWS

public static final int ROWS
Row barchart type

STACK

public static final int STACK
Stacked barchart type

GROUP

public static final int GROUP
Group barchart type

GROUPSTACK

public static final int GROUPSTACK
Stacked/Grouped barchart type

TOTAL

public static final int TOTAL
Total value shown on popup when barchart type is stack

ITEM

public static final int ITEM
Discrete value shown on popup when barchart type is stack

BOTTOMUP

public static final int BOTTOMUP
Stack bar sets from the bottom up when barchart type is stack

TOPDOWN

public static final int TOPDOWN
Stack bar sets from the top down when barchart type is stack

stackDisplayOrderMap

public static java.util.Hashtable stackDisplayOrderMap
stack display order hashtable

orientationMap

public static java.util.Hashtable orientationMap
orientation hashtable

barchartTypeMap

public static java.util.Hashtable barchartTypeMap
barchart type hashtable

stackTypeMap

public static java.util.Hashtable stackTypeMap
barchart stack type hashtable
Constructor Detail

NFAbstractBarchart

public NFAbstractBarchart()
Constructs a default chart object.

NFAbstractBarchart

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

NFAbstractBarchart

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

NFAbstractBarchart

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

setBarBorder

public void setBarBorder(NFLine barBorder)
Set border for this bar chart
Parameters:
barBorder - The line style to use for the bar border

getBarBorder

public NFLine getBarBorder()
Returns the bar border for this bar chart
Returns:
barBorder The line style to use for the bar border

setBarWidth

public void setBarWidth(int barWidth)
Set bar width. Defines the relative width of the bar as a percentage of available space. A smaller number results in more space between bars.
Parameters:
barWidth -  

getBarWidth

public int getBarWidth()
Get bar width. Defines the relative width of the bar as a percentage of available space. A smaller number results in more space between bars.
Returns:
barWidth

setStackType

public void setStackType(int stackType)
Set barchart stack type, either TOTAL or ITEM. This parameter affects how data values will be shown on the mouseover popup. When stackType is TOTAL, the total value of the bar will be shown. When stackType is ITEM, the value of the moused over segment will be displayed.

If the value passed is not a valid barchart type, ITEM will be used.

Parameters:
stackType - One of ITEM, TOTAL

getStackType

public int getStackType()
Get barchart stack type, either TOTAL or ITEM. This parameter affects how data values will be shown on the mouseover popup. When stackType is TOTAL, the total value of the bar will be shown. When stackType is ITEM, the value of the moused over segment will be displayed.
Returns:
stackType One of ITEM, TOTAL

setStackDisplayOrder

public void setStackDisplayOrder(int stackDisplayOrder)
Set barchart stack display order, either BOTTOMUP or TOPDOWN. This parameter affects which direction the bars are stacked in STACK mode.
Parameters:
stackDisplayOrder - One of BOTTOMUP, TOPDOWN

getStackDisplayOrder

public int getStackDisplayOrder()
Get barchart stack display order, either BOTTOMUP or TOPDOWN. This parameter affects which direction the bars are stacked in STACK mode.
Returns:
One of BOTTOMUP, TOPDOWN

setDataLabels

public void setDataLabels(NFVector dataLabels)
Set the labels to be displayed under each bar. The vector contains a list of string values.
Returns:
dataLabels

getDataLabels

public NFVector getDataLabels()
Get the labels to be displayed under each bar. The vector contains a list of string values.
Returns:
dataLabels

setBarActiveLabels

public void setBarActiveLabels(NFVector barActiveLabels)
Set active labels to be associated with each data label.
Parameters:
barActiveLabels - Vector of NFActiveLabels

getBarActiveLabels

public NFVector getBarActiveLabels()
Get active labels to be associated with each data label.
Returns:
barActiveLabels Vector of NFActiveLabels

addBarSet

public void addBarSet(NFBarSet barSet)
Adds a bar set to the current list of barsets.
Parameters:
barSet - The barset to add.

setBarSeries

public void setBarSeries(NFBarSeries barSeries)
Set the bar series. This is a vector of barsets. To set a property on the bar series, you must first retrieve the series, then set the property (properties) and finally set the bar series.
      NFBarchart chart = new NFBarchart();
      NFBarSeries bs = chart.getBarSeries();
      NFBarSet set = (NFBarSet)bs.elementAt(0);
      // Set some of the properties on the NFBarSet
      ...
      bs.setElementAt(set, 0);
      chart.setBarSeries(bs);
 
Parameters:
barSeries -  

getBarSeries

public NFBarSeries getBarSeries()
Get the bar series. This is a vector of barsets. To set a property on the bar series, you must first retrieve the series, then set the property (properties) and finally set the bar series.
      NFBarchart chart = new NFBarchart();
      NFBarSeries bs = chart.getBarSeries();
      NFBarSet set = (NFBarSet)bs.elementAt(0);
      // Set some of the properties on the NFBarSet
      ...
      bs.setElementAt(set, 0);
      chart.setBarSeries(bs);
 
Returns:
barSeries

setBarValueLabel

public void setBarValueLabel(NFModalLabel barValueLabel)
Set the text style to use for labeling bars in this barset.
Parameters:
barValueLabel - Text style.

getBarValueLabel

public NFModalLabel getBarValueLabel()
Get the text style to use for labeling bars in this barset.
Returns:
text style or null if not defined.

setBarValueLabelRegion

public void setBarValueLabelRegion(NFRegion barValueRegion)
Set the text background style to use for labeling bars in this barset.
Parameters:
barValueRegion - Text background style.

getBarValueLabelRegion

public NFRegion getBarValueLabelRegion()
Get the text background style to use for labeling bars in this barset.
Returns:
text background style.

setZAxisLabels

public void setZAxisLabels(NFModalLabel zAxisLabel)
Set the text style and value to use for labeling the Z Axis.
Parameters:
zAxisLabel - Text style and value

getZAxisLabels

public NFModalLabel getZAxisLabels()
Returns the text style and value to use for labeling the Z Axis.
Returns:
text style or null if not defined

writeExternal

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

writeChart

public void writeChart(java.lang.StringBuffer sb)
Writes this chart into a string buffer
Overrides:
writeChart in class NFDataChart

resetState

public void resetState()
Resets all of the parameter values to their initial state.
Overrides:
resetState in class NFDataChart

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 - 2006
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 14, 2006