NetCharts Pro

netcharts.pro.charts.stock
Class NFStockchart

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
                                |
                                +--netcharts.pro.charts.stock.NFStockchart
All Implemented Interfaces:
java.io.Externalizable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver, java.io.Serializable

public class NFStockchart
extends NFCombochart

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

See Also:
Serialized Form

Fields inherited from class netcharts.pro.charts.combo.NFCombochart
BOTTOMUP, DRAWBAR, DRAWFILL, DRAWLINE, drawOrderMap, DRAWSTOCK, GROUP, GROUPSTACK, HORIZONTAL, ITEM, ROWS, STACK, stackDisplayOrderMap, TOPDOWN, TOTAL, VERTICAL
 
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
NFStockchart()
          Constructs a default chart object.
NFStockchart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFStockchart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFStockchart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 void addStockSet(NFStockSet stockSet)
          Adds a stock set to the current list of stocksets.
 java.lang.String getDefaultData()
          Returns a string of default data
 int getOrientation()
          Always returns vertical
 int getStockBarWidth()
          This parameter specifies the relative size of each bar used when displaying stock values.
 boolean getStockLabelsEnabled()
          Get whether or not popups over lines are enabled.
 NFStockSeries getStockSeries()
          Get the stock series.
 int getTicLength()
          The ticLength attribute defines the length of the open/close tic marks in pixels.
 int getType()
          Gets the chart type.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setOrientation(int orientation)
          Noop - Stockchart bars are vertical only.
 void setStockBarWidth(int stockBarWidth)
          This parameter specifies the relative size of each bar used when displaying stock values.
 void setStockLabelsEnabled(boolean stockLabelsEnabled)
          Set enable popup labels over stock lines.
 void setStockSeries(NFStockSeries stockSeries)
          Set the stock series.
 void setTicLength(int ticLength)
          This parameter specifies the relative size of each tic mark used when displaying stock values.
 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.combo.NFCombochart
addLineSet, getBarActiveLabels, getBarBorder, getBarchartType, getBarDepth, getBarSeries, getBarValueLabel, getBarValueLabelRegion, getBarWidth, getDataLabels, getDrawOrder, getGroupStackLabels, getGroupStackSegmentLabels, getLineLabelsEnabled, getLineSeries, getShowGroupStackLabels, getStackDisplayOrder, getStackType, getZAxisLabels, setBarActiveLabels, setBarBorder, setBarchartType, setBarDepth, setBarSeries, setBarValueLabel, setBarValueLabelRegion, setBarWidth, setDataLabels, setDrawOrder, setGroupStackLabels, setGroupStackSegmentLabels, setLineLabelsEnabled, setLineSeries, setShowGroupStackLabels, setStackDisplayOrder, setStackType, setZAxisLabels
 
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, 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, 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, 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
 

Constructor Detail

NFStockchart

public NFStockchart()
Constructs a default chart object.

NFStockchart

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

NFStockchart

public NFStockchart(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. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.

NFStockchart

public NFStockchart(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. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.
Method Detail

getDefaultData

public java.lang.String getDefaultData()
Returns a string of default data
Overrides:
getDefaultData in class NFCombochart
Following copied from class: netcharts.pro.common.NFGraph
Returns:
The default data used to initialize a chart.

getType

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

setStockBarWidth

public void setStockBarWidth(int stockBarWidth)
This parameter specifies the relative size of each bar used when displaying stock values. The stockBarWidth attribute is interpreted as a percentage in the range of 1-100. If 100 percent is specified for the stockBarWidth, it will occupy all of the space allocated for each stock symbol (leaving no room for the tic marks). The default stockBarWidth is 33%.
Parameters:
stockBarWidth -  

getStockBarWidth

public int getStockBarWidth()
This parameter specifies the relative size of each bar used when displaying stock values. The stockBarWidth attribute is interpreted as a percentage in the range of 1-100. If 100 percent is specified for the stockBarWidth, it will occupy all of the space allocated for each stock symbol (leaving no room for the tic marks). The default stockBarWidth is 33%.
Returns:
stockBarWidth

setTicLength

public void setTicLength(int ticLength)
This parameter specifies the relative size of each tic mark used when displaying stock values. The ticLength attribute is interpreted as a percentage in the range of 1-100. If 0 percent is specified for the ticLength is set to 0, then the tic will fill up the remaining space not used by the bar. The default ticLength is 0.
Parameters:
ticLength -  

getTicLength

public int getTicLength()
The ticLength attribute defines the length of the open/close tic marks in pixels. This pixel value overrides the NFStockchart settings for ticLength. If either stockBarWidth or the ticLength parameter is set to 0 then the NFStockchart values are used to determine the size of the bar and tics.
Returns:
ticLength

setOrientation

public void setOrientation(int orientation)
Noop - Stockchart bars are vertical only.
Overrides:
setOrientation in class NFCombochart
Parameters:
orientation -  

getOrientation

public int getOrientation()
Always returns vertical
Overrides:
getOrientation in class NFCombochart
Returns:
orientation

addStockSet

public void addStockSet(NFStockSet stockSet)
Adds a stock set to the current list of stocksets.
Parameters:
stockSet - The stockset to add.

setStockSeries

public void setStockSeries(NFStockSeries stockSeries)
                    throws NFParamException
Set the stock series. This is a vector of stocksets. To set a property on the stock series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFStockchart chart = new NFStockchart();
     NFStockSeries ss = chart.getStockSeries();
     NFStockSet set = (NFStockSet)ss.elementAt(0);
     // Set some of the properties on the NFStockSet
     ...
     ss.setElementAt(set, 0);
     chart.setStockSeries(ss);
 
Parameters:
stockSeries -  

getStockSeries

public NFStockSeries getStockSeries()
Get the stock series. This is a vector of stocksets. To set a property on the stock series, you must first retrieve the series, then set the property (properties) and finally set the line series.
     NFStockchart chart = new NFStockchart();
     NFStockSeries ss = chart.getStockSeries();
     NFStockSet set = (NFStockSet)ss.elementAt(0);
     // Set some of the properties on the NFStockSet
     ...
     ss.setElementAt(set, 0);
     chart.setStockSeries(ss);
 
Returns:
stockSeries

setStockLabelsEnabled

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

getStockLabelsEnabled

public boolean getStockLabelsEnabled()
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 NFCombochart

writeChart

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

resetState

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

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