|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFGraph
netcharts.pro.common.zoomable.NFZoomableChart
netcharts.pro.common.rectangular.NFDataChart
netcharts.pro.charts.strip.NFStripchart
public class NFStripchart
Represents a strip chart. Strip Charts are ideal for displaying time based data that is periodically updated. Some examples are performance meters, currency tracking, stock tracking, seismograph, and so on. The Strip Chart is designed to make implementing this type of chart easy, fast, and Internet accessible. The Strip Chart is based on a certain number of "slots" in the X axis. The slots are equally divided into the available graphing space and represent a particular point in time. The rightmost slot contains the newest data, and the leftmost slot has the oldest displayed data. Data in multiple data sets is added synchronously, with one point being extracted from each dataset as each new slot is added. Note that data is only displayed in the graph after the doUpdate method call.
Field Summary | |
---|---|
static java.util.Hashtable |
barstyleTypeMap
bar style type hashtable |
static int |
GROUP
Group bar style |
static int |
LINE_SYMBOL_ANIMATION_STYLE_FADE
Line symbol animation style fade |
static int |
LINE_SYMBOL_ANIMATION_STYLE_NONE
No line symbol animation style |
static int |
LINE_SYMBOL_ANIMATION_STYLE_SCALE
Line symbol animation style scale |
static int |
STACK
Stacked bar style |
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, LINE, MULTIPIE, PARETO, PIE, POLAR, RADAR, STOCK, STRIP, TIME, XY |
Constructor Summary | |
---|---|
NFStripchart()
Constructs a default chart object. |
|
NFStripchart(javax.swing.JPanel panel)
Constructs a chart object on the given JPanel. |
|
NFStripchart(javax.swing.JPanel panel,
java.util.Properties initProperties)
Constructs a chart object on the given JPanel. |
|
NFStripchart(java.util.Properties initProperties)
Constructs a chart object on the given JPanel. |
Method Summary | |
---|---|
void |
addDataSlot(double[] data)
Adds an array of elements for one slot. |
void |
addDataSlot(double[] data,
java.lang.String bottomLabel,
java.lang.String topLabel)
Adds an array of elements for one slot. |
void |
addLineSet(NFLineSet lineSet)
Adds a line set to the current list of linesets. |
int |
getBarStyle()
Get bar style, either GROUP (default) or STACK |
NFAxis |
getBottomAxis()
Returns the bottom axis object. |
NFAxisSeries |
getBottomAxisSeries()
Overrides NFDataChart. |
int |
getDataBufferSize()
Gets the stripchart data buffer size. |
java.lang.String |
getDefaultData()
Returns a string of default data |
boolean |
getFillFromLeft()
Gets how the initial fill should occur |
NFStripLineSeries |
getLineSeries()
Get the line series. |
int |
getLineSymbolAnimationStyle()
Get the line symbol animation style. |
NFModalLabel |
getLineValueLabel()
Get the text style to use for line labels. |
NFRegion |
getLineValueLabelRegion()
Get the text background style to use for line labels. |
int |
getNumberOfSlotsShown()
Gets the stripchart number of slots parameter. |
NFAxis |
getTopAxis()
Returns the top axis object. |
NFAxisSeries |
getTopAxisSeries()
Overrides NFDataChart. |
int |
getType()
Gets the chart type. |
java.lang.String |
getUndefinedString()
Gets the text to be used if a tic label is not passed. |
void |
resetState()
Resets all of the parameter values to their initial state. |
void |
setBarStyle(int barStyle)
Set bar style, either GROUP (default) or STACK |
void |
setBottomAxis(NFAxis bottomAxis)
Sets the bottom NFStripAxis object. |
void |
setBottomAxisSeries(NFAxisSeries bottomAxisSeries)
Overrides NFDataChart. |
void |
setDataBufferSize(int dataBufferSize)
Sets the stripchart data buffer size. |
void |
setFillFromLeft(boolean fillFromLeft)
Sets how the initial fill should occur |
void |
setLineSeries(NFStripLineSeries lineSeries)
Set the line series. |
void |
setLineSymbolAnimationStyle(int style)
Set the line symbol animation style. |
void |
setLineValueLabel(NFModalLabel lineValueLabel)
Set the text style to use for line labels. |
void |
setLineValueLabelRegion(NFRegion lineValueRegion)
Set the text background style to use for line labels. |
void |
setNumberOfSlotsShown(int numSlots)
Sets the stripchart number of slots parameter. |
void |
setStripLayout(int numSlots,
int dataBufferSize,
boolean fillFromLeft,
java.lang.String undefinedString)
Sets the stripchart configuration |
void |
setTopAxis(NFAxis topAxis)
Sets the top NFStripAxis object. |
void |
setTopAxisSeries(NFAxisSeries topAxisSeries)
Overrides NFDataChart. |
void |
setUndefinedString(java.lang.String undefinedString)
Sets the text to be used if a tic label is not passed. |
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, getGrid, getGridAnimationStyle, getGridDepth, getGridSeries, getLeftAxis, getLeftAxisSeries, getRightAxis, getRightAxisSeries, getXAxis, getYAxis, setAutoscalePad, setAxesSizes, setAxisThickness, setGrid, setGridAnimationStyle, setGridDepth, setGridSeries, setLeftAxis, setLeftAxisSeries, setRightAxis, setRightAxisSeries |
Methods inherited from class netcharts.pro.common.zoomable.NFZoomableChart |
---|
getMouseControlDown, getMouseMetaDown, getMouseShiftDown, getZoomingEnabled, setMouseControlDown, setMouseMetaDown, setMouseShiftDown, setZoomingEnabled, zoom |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int STACK
public static final int GROUP
public static java.util.Hashtable barstyleTypeMap
public static final int LINE_SYMBOL_ANIMATION_STYLE_NONE
public static final int LINE_SYMBOL_ANIMATION_STYLE_SCALE
public static final int LINE_SYMBOL_ANIMATION_STYLE_FADE
Constructor Detail |
---|
public NFStripchart()
public NFStripchart(javax.swing.JPanel panel)
panel
- Panel to draw chart on.public NFStripchart(java.util.Properties initProperties)
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.public NFStripchart(javax.swing.JPanel panel, java.util.Properties initProperties)
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 |
---|
public java.lang.String getDefaultData()
getDefaultData
in class NFGraph
public void setBarStyle(int barStyle)
barStyle
- public int getBarStyle()
public void addLineSet(NFLineSet lineSet)
lineSet
- The lineset to add.public void setLineSeries(NFStripLineSeries lineSeries) throws NFParamException
NFStripchart chart = new NFStripchart(); NFStripLineSeries ls = chart.getLineSeries(); NFLineSet set = (NFLineSet)ls.elementAt(0); // Set some of the properties on the NFLineSet ... ls.setElementAt(set, 0); chart.setLineSeries(ls);
lineSeries
-
NFParamException
public NFStripLineSeries getLineSeries()
NFStripchart chart = new NFStripchart(); NFStripLineSeries ls = chart.getLineSeries(); NFLineSet set = (NFLineSet)ls.elementAt(0); // Set some of the properties on the NFLineSet ... ls.setElementAt(set, 0); chart.setLineSeries(ls);
public int getType()
getType
in class NFGraph
netcharts.pro.charts.strip.NFGraph.STRIP
public void setBottomAxis(NFAxis bottomAxis)
setBottomAxis
in class NFDataChart
bottomAxis
- public NFAxis getBottomAxis()
getBottomAxis
in class NFDataChart
public void setBottomAxisSeries(NFAxisSeries bottomAxisSeries)
setBottomAxisSeries
in class NFDataChart
bottomAxisSeries
- public NFAxisSeries getBottomAxisSeries()
getBottomAxisSeries
in class NFDataChart
public void setTopAxis(NFAxis topAxis)
setTopAxis
in class NFDataChart
topAxis
- public NFAxis getTopAxis()
getTopAxis
in class NFDataChart
public void setTopAxisSeries(NFAxisSeries topAxisSeries)
setTopAxisSeries
in class NFDataChart
topAxisSeries
- public NFAxisSeries getTopAxisSeries()
getTopAxisSeries
in class NFDataChart
public void addDataSlot(double[] data)
data
- An array of data elementspublic void addDataSlot(double[] data, java.lang.String bottomLabel, java.lang.String topLabel)
data
- An array of data elementsbottomLabel
- The slot bottom tic label. Set to null if not needed.topLabel
- The slot top tic label. Set to null if not needed.public void setStripLayout(int numSlots, int dataBufferSize, boolean fillFromLeft, java.lang.String undefinedString)
numSlots
- Number of discrete data slots in the X axis.dataBufferSize
- The size of the buffer that holds data
before display.fillFromLeft
- If true, the points will start at the left of the
data window.undefinedString
- Text to put on a tic label if the label has
not been otherwise defined.public void setNumberOfSlotsShown(int numSlots)
numSlots
- Number of discrete data slots in the X axis.public int getNumberOfSlotsShown()
public void setDataBufferSize(int dataBufferSize)
dataBufferSize
- The size of the input data buffer.public int getDataBufferSize()
public void setFillFromLeft(boolean fillFromLeft)
fillFromLeft
- If true, points will fill the stripchart
from the left side.public boolean getFillFromLeft()
public void setUndefinedString(java.lang.String undefinedString)
Once any portion of the StripLayout has been defined, the undefined string will not be changed until data is added.
It is recommended that this value be set either during initialization (via a StripLayout CDL parameter in a template, or programmatically before any other StripLayout related parameters, numberOfSlotsShown, fillFromLeft and dataBufferSize. Once any of these parameters are set, the undefined string will not be changed until data is added.
undefinedString
- Text to be used when a tic label is not passed.public java.lang.String getUndefinedString()
public void setLineValueLabel(NFModalLabel lineValueLabel)
lineValueLabel
- Text style.public NFModalLabel getLineValueLabel()
public void setLineValueLabelRegion(NFRegion lineValueRegion)
lineValueRegion
- Text background style.public NFRegion getLineValueLabelRegion()
public void setLineSymbolAnimationStyle(int style)
If the value passed is not a valid line symbol animation style, LINE_SYMBOL_ANIMATION_STYLE_NONE will be used.
style
- One of LINE_SYMBOL_ANIMATION_STYLE_NONE (default), LINE_SYMBOL_ANIMATION_STYLE_SCALE or LINE_SYMBOL_ANIMATION_STYLE_FADE
public int getLineSymbolAnimationStyle()
LINE_SYMBOL_ANIMATION_STYLE_NONE (default), LINE_SYMBOL_ANIMATION_STYLE_SCALE or LINE_SYMBOL_ANIMATION_STYLE_FADE
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class NFDataChart
java.io.IOException
public void writeChart(java.lang.StringBuffer sb)
writeChart
in class NFDataChart
public void resetState()
resetState
in class NFDataChart
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |