NetCharts Pro

netcharts.pro.charts.stock
Class NFStockchart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.common.zoomable.NFZoomableChart
          extended by netcharts.pro.common.rectangular.NFDataChart
              extended by netcharts.pro.common.lineset.NFAbstractLineChart
                  extended by netcharts.pro.charts.combo.NFCombochart
                      extended by netcharts.pro.charts.stock.NFStockchart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver

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

Field Summary
static int STOCK_ANIMATION_STYLE_FADE
          Stock animation style fade
static int STOCK_ANIMATION_STYLE_GROW
          Stock animation style grow
static int STOCK_ANIMATION_STYLE_NONE
          No stock animation style
 
Fields inherited from class netcharts.pro.charts.combo.NFCombochart
BAR_ANIMATION_STYLE_FADE, BAR_ANIMATION_STYLE_GROW, BAR_ANIMATION_STYLE_NONE, BOTTOMUP, connectorTypeMap, DRAWBAR, DRAWFILL, DRAWLINE, drawOrderMap, DRAWSTOCK, FILL, GROUP, GROUPSTACK, HORIZONTAL, ITEM, LINE, OFF, ROWS, STACK, stackDisplayOrderMap, TOPDOWN, TOTAL, VERTICAL
 
Fields inherited from class netcharts.pro.common.lineset.NFAbstractLineChart
LINE_ANIMATION_STYLE_BEND, LINE_ANIMATION_STYLE_FADE, LINE_ANIMATION_STYLE_NONE, LINE_SYMBOL_ANIMATION_STYLE_FADE, LINE_SYMBOL_ANIMATION_STYLE_NONE, LINE_SYMBOL_ANIMATION_STYLE_SCALE
 
Fields inherited from class netcharts.pro.common.rectangular.NFDataChart
GRID_ANIMATION_STYLE_FADE, GRID_ANIMATION_STYLE_NONE
 
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, 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, 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 getStockAnimationStyle()
          Get the stock animation style.
 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 setDataLegendEnabled(boolean dataLegendEnabled)
          Noop - Stockcharts cannot contain data legends.
 void setDataLegendGridBackground(NFGridBackground dataLegendGridBackground)
          Noop - Stockcharts cannot contain data legends grid backgrounds.
 void setDataLegendGridLine(NFGridLine dataLegendGridLine)
          Noop - Stockcharts cannot contain data legends grid lines.
 void setOrientation(int orientation)
          Noop - Stockchart bars are vertical only.
 void setStockAnimationStyle(int style)
          Set the stock animation style.
 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, getBarAnimationStyle, getBarBorder, getBarchartType, getBarCorners, getBarDepth, getBarDropShadow, getBarHighlightSeries, getBarSeries, getBarSpotlightSeries, getBarValueLabel, getBarValueLabelRegion, getBarWidth, getBarWidths, getDataLabels, getDataLegendGridBackground, getDataLegendGridLine, getDrawOrder, getGroupStackLabels, getGroupStackSegmentLabels, getLineLabelsEnabled, getLineSeries, getShowGroupStackLabels, getStackDisplayOrder, getStackedBarConnector, getStackType, getZAxisLabels, isDataLegendEnabled, setBarActiveLabels, setBarAnimationStyle, setBarBorder, setBarchartType, setBarCorners, setBarDepth, setBarDropShadow, setBarHighlightSeries, setBarSeries, setBarSpotlightSeries, setBarValueLabel, setBarValueLabelRegion, setBarWidth, setBarWidths, setDataLabels, setDrawOrder, setGroupStackLabels, setGroupStackSegmentLabels, setLineLabelsEnabled, setLineSeries, setShowGroupStackLabels, setStackDisplayOrder, setStackedBarConnector, setStackType, setZAxisLabels
 
Methods inherited from class netcharts.pro.common.lineset.NFAbstractLineChart
getDepth, getLineAnimationStyle, getLineDropShadow, getLineSymbolAnimationStyle, getLineSymbolSpotlightSeries, getLineValueLabel, getLineValueLabelRegion, getLineZWidth, setDepth, setLineAnimationStyle, setLineDropShadow, setLineSymbolAnimationStyle, setLineSymbolSpotlightSeries, setLineValueLabel, setLineValueLabelRegion, setLineZWidth
 
Methods inherited from class netcharts.pro.common.rectangular.NFDataChart
addGrid, getAutoscalePad, getAxesSizes, getAxisThickness, getBottomAxis, getBottomAxisSeries, getGrid, getGridAnimationStyle, getGridDepth, getGridSeries, getLeftAxis, getLeftAxisSeries, getRightAxis, getRightAxisSeries, getTopAxis, getTopAxisSeries, getXAxis, getYAxis, setAutoscalePad, setAxesSizes, setAxisThickness, setBottomAxis, setBottomAxisSeries, setGrid, setGridAnimationStyle, 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, zoom
 
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

STOCK_ANIMATION_STYLE_NONE

public static final int STOCK_ANIMATION_STYLE_NONE
No stock animation style

See Also:
Constant Field Values

STOCK_ANIMATION_STYLE_GROW

public static final int STOCK_ANIMATION_STYLE_GROW
Stock animation style grow

See Also:
Constant Field Values

STOCK_ANIMATION_STYLE_FADE

public static final int STOCK_ANIMATION_STYLE_FADE
Stock animation style fade

See Also:
Constant Field Values
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
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 -
Throws:
NFParamException

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.

setStockAnimationStyle

public void setStockAnimationStyle(int style)
Set the stock animation style.

If the value passed is not a valid stock animation style, STOCK_ANIMATION_STYLE_NONE will be used.

Parameters:
style - One of STOCK_ANIMATION_STYLE_NONE (default), STOCK_ANIMATION_STYLE_GROW or STOCK_ANIMATION_STYLE_FADE

getStockAnimationStyle

public int getStockAnimationStyle()
Get the stock animation style.

Returns:
type One of STOCK_ANIMATION_STYLE_NONE (default), STOCK_ANIMATION_STYLE_GROW or STOCK_ANIMATION_STYLE_FADE

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

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

setDataLegendEnabled

public void setDataLegendEnabled(boolean dataLegendEnabled)
Noop - Stockcharts cannot contain data legends.

Overrides:
setDataLegendEnabled in class NFCombochart
Parameters:
dataLegendEnabled -

setDataLegendGridBackground

public void setDataLegendGridBackground(NFGridBackground dataLegendGridBackground)
Noop - Stockcharts cannot contain data legends grid backgrounds.

Overrides:
setDataLegendGridBackground in class NFCombochart
Parameters:
dataLegendGridBackground -

setDataLegendGridLine

public void setDataLegendGridLine(NFGridLine dataLegendGridLine)
Noop - Stockcharts cannot contain data legends grid lines.

Overrides:
setDataLegendGridLine in class NFCombochart
Parameters:
dataLegendGridLine -

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