NetCharts Pro

netcharts.pro.charts.combo
Class NFCombochart

java.lang.Object
  |
  +--netcharts.pro.common.NFGraph
        |
        +--netcharts.pro.common.zoomable.NFZoomableChart
              |
              +--netcharts.pro.common.rectangular.NFDataChart
                    |
                    +--netcharts.pro.common.lineset.NFAbstractLineChart
                          |
                          +--netcharts.pro.charts.combo.NFCombochart
All Implemented Interfaces:
java.io.Externalizable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver, java.io.Serializable
Direct Known Subclasses:
NFStockchart

public class NFCombochart
extends NFAbstractLineChart

Combo chart object. Provides the ability to configure the chart via object manipulation or directly from CDL.

See Also:
Serialized Form

Field Summary
static int DRAWBAR
          Draw bar - used in setDrawOrder
static int DRAWFILL
          Draw fill - used in setDrawOrder
static int DRAWLINE
          Draw line - used in setDrawOrder
static java.util.Hashtable drawOrderMap
          draw order hashtable
static int DRAWSTOCK
          Draw stock - used in setDrawOrder.
static int GROUP
          Group barchart type
static int HORIZONTAL
          Horizontal orientation
static int ITEM
          Discrete value shown on popup when barchart type is stack
static int ROWS
          Row barchart type
static int STACK
          Stacked barchart type
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
BAR, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, LINE, PIE, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFCombochart()
          Constructs a default chart object.
NFCombochart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFCombochart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFCombochart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 void addLineSet(NFLineSet lineSet)
          Adds a line set to the current list of linesets.
 NFVector getBarActiveLabels()
          Get active labels to be associated with each bar data label.
 NFLine getBarBorder()
          Get barBorder for this chart
 int getBarchartType()
          Get bar type, either GROUP (default) STACK, or ROWS
 int getBarDepth()
          Get 3DDepth for bars
 NFBarSeries getBarSeries()
          Get the bar series.
 NFModalLabel getBarValueLabel()
          Get the text style to use for labeling bars.
 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.
 java.lang.String getDefaultData()
          Returns a string of default data
 int[] getDrawOrder()
          Get the draw order.
 boolean getLineLabelsEnabled()
          Get whether or not popups over lines are enabled.
 NFLineSeries getLineSeries()
          Get the line series.
 int getOrientation()
          Get graph orientation, either VERTICAL (default) or HORIZONTAL
 int getStackType()
          Get bar stack type, either TOTAL or ITEM.
 int getType()
          Gets the chart type.
 NFModalLabel getZAxisLabels()
           
 void resetState()
          Resets all of the parameter values to their initial state.
 void setBarActiveLabels(NFVector barActiveLabels)
          Set active labels to be associated with each bar data label.
 void setBarBorder(NFLine barBorder)
          Set border for this chart
 void setBarchartType(int type)
          Set bar type, either GROUP (default) STACK, or ROWS
 void setBarDepth(int depth)
          Set 3DDepth for bars
 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 setDrawOrder(int[] drawOrder)
          Set the draw order.
 void setLineLabelsEnabled(boolean lineLabelsEnabled)
          Set enable popup labels over lines.
 void setLineSeries(NFLineSeries lineSeries)
          Set the line series.
 void setOrientation(int orientation)
          Set graph orientation, either VERTICAL (default) or HORIZONTAL
 void setStackType(int stackType)
          Set bar stack type, either TOTAL or ITEM.
 void setZAxisLabels(NFModalLabel zAxisLabel)
           
 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.lineset.NFAbstractLineChart
getDepth, getLineValueLabel, getLineValueLabelRegion, getLineZWidth, setDepth, setLineValueLabel, setLineValueLabelRegion, setLineZWidth
 
Methods inherited from class netcharts.pro.common.rectangular.NFDataChart
addGrid, getAxesSizes, getAxisThickness, getBottomAxis, getBottomAxisSeries, getGrid, getGridDepth, getGridSeries, getLeftAxis, getLeftAxisSeries, getRightAxis, getRightAxisSeries, getTopAxis, getTopAxisSeries, 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, 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
 

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

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

DRAWBAR

public static final int DRAWBAR
Draw bar - used in setDrawOrder

DRAWLINE

public static final int DRAWLINE
Draw line - used in setDrawOrder

DRAWFILL

public static final int DRAWFILL
Draw fill - used in setDrawOrder

DRAWSTOCK

public static final int DRAWSTOCK
Draw stock - used in setDrawOrder. Use only in NFStockchart implementations.

drawOrderMap

public static java.util.Hashtable drawOrderMap
draw order hashtable
Constructor Detail

NFCombochart

public NFCombochart()
Constructs a default chart object.

NFCombochart

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

NFCombochart

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

NFCombochart

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

getDefaultData

public java.lang.String getDefaultData()
Returns a string of default data
Overrides:
getDefaultData in class NFGraph

getType

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

addLineSet

public void addLineSet(NFLineSet lineSet)
Adds a line set to the current list of linesets.
Overrides:
addLineSet in class NFAbstractLineChart
Parameters:
lineSet - The lineset to add.

setLineSeries

public void setLineSeries(NFLineSeries lineSeries)
                   throws NFParamException
Set the line series. This is a vector of NFLineSets. To set a property on the line series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFLinechart chart = new NFLinechart();
     NFLineSeries bs = chart.getLineSeries();
     NFLineSet set = (NFLineSet)ls.elementAt(0);
     // Set some of the properties on the NFLineSet
     ...
     bs.setElementAt(set, 0);
     chart.setLineSeries(bs);
 
Overrides:
setLineSeries in class NFAbstractLineChart
Parameters:
lineSeries -  

getLineSeries

public NFLineSeries getLineSeries()
Get the line series. This is a vector of NFLineSets. To set a property on the line series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFLinechart chart = new NFLinechart();
     NFLineSeries ls = chart.getLineSeries();
     NFLineSet set = (NFLineSet)ls.elementAt(0);
     // Set some of the properties on the NFLineSet
     ...
     ls.setElementAt(set, 0);
     chart.setLineSeries(ls);
 
Overrides:
getLineSeries in class NFAbstractLineChart
Returns:
lineSeries

setBarBorder

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

getBarBorder

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

setBarDepth

public void setBarDepth(int depth)
Set 3DDepth for bars
Parameters:
depth - 3D shadow depth for bars

getBarDepth

public int getBarDepth()
Get 3DDepth for bars
Returns:
depth 3D shadow depth for bars

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

setOrientation

public void setOrientation(int orientation)
Set graph orientation, either VERTICAL (default) or HORIZONTAL
Parameters:
orientation -  

getOrientation

public int getOrientation()
Get graph orientation, either VERTICAL (default) or HORIZONTAL
Returns:
orientation

setBarchartType

public void setBarchartType(int type)
Set bar type, either GROUP (default) STACK, or ROWS
Parameters:
type -  

getBarchartType

public int getBarchartType()
Get bar type, either GROUP (default) STACK, or ROWS
Returns:
type

setStackType

public void setStackType(int stackType)
Set bar stack type, either TOTAL or ITEM. This parameter affects how data values will be shown on the bar 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.
Parameters:
stackType -  

getStackType

public int getStackType()
Get bar stack type, either TOTAL or ITEM. This parameter affects how data values will be shown on the bar 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

setDataLabels

public void setDataLabels(NFVector dataLabels)
                   throws NFParamException
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)
                        throws NFParamException
Set active labels to be associated with each bar data label.
Parameters:
barActiveLabels - Vector of NFActiveLabels

getBarActiveLabels

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

setBarSeries

public void setBarSeries(NFBarSeries barSeries)
                  throws NFParamException
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.
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.

setDrawOrder

public void setDrawOrder(int[] drawOrder)
                  throws NFParamException
Set the draw order. This determines the order in which data elements of this chart will be drawn. The drawOrder is sent in as an int array. Each element is expected to contain one of: NFCombochart.DRAWBAR NFCombochart.DRAWLINE NFCombochart.DRAWFILL NFCombochart.DRAWSTOCK The objects will be drawn according to their position in the list (e.g. the first in the list is drawn first).
Parameters:
drawOrder -  

getDrawOrder

public int[] getDrawOrder()
Get the draw order. This determines the order in which data elements of this chart will be drawn. The drawOrder is sent in as an int array. Each element is expected to contain one of: NFCombochart.DRAWBAR NFCombochart.DRAWLINE NFCombochart.DRAWFILL NFCombochart.DRAWSTOCK The objects will be drawn according to their position in the list (e.g. the first in the list is drawn first).
Returns:
drawOrder

setZAxisLabels

public void setZAxisLabels(NFModalLabel zAxisLabel)

getZAxisLabels

public NFModalLabel getZAxisLabels()

setLineLabelsEnabled

public void setLineLabelsEnabled(boolean lineLabelsEnabled)
Set enable popup labels over lines.
Parameters:
lineLabelsEnabled - When popups will appear over lines of the chart.

getLineLabelsEnabled

public boolean getLineLabelsEnabled()
Get whether or not popups over lines are enabled.
Returns:
lineLabelsEnabled When popups will appear over lines of the chart.

writeExternal

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

writeChart

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

resetState

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

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