All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.eou.swingchart.ChartDataReducer

java.lang.Object
   |
   +----com.ibm.eou.swingchart.ChartDataReducer

public class ChartDataReducer
extends Object
implements Serializable
The Chart DataReducer class is intended for use in conjunction with the Chart bean in order to limit the amount of data which the chart has to represent. This bean is especially useful, when the data source has more columns than the number of pixels available to display the chart.
The amount of data is limited by including only a specified number of columns of the input in the output which is achieved by selecting the desired reducing algorithm - by setting the ReducingMethod property to one of the following values:
Where the value n is taken from the MaxOutputColumns property


Variable Index

 o FILTER
Gets x columns at regular intervals
 o FIRST
Gets first x columns
 o LAST
Gets last x columns
 o MIDDLE
Gets middle x columns
 o SMOOTH
Averages regular groups of columns

Constructor Index

 o ChartDataReducer()

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
 o copyright()
 o getMaxOutputColumns()
Returns the number of columns which will form the output
 o getOutputValueGrid()
Returns the output produced after the reduction of the input as a DoubleGrid object.
 o getOutputValues()
Returns the output produced after the reduction of the input
 o getReducingRule()
Returns a value representing the algorithm selected to reduce the data.
 o getValueGrid()
Gets the input values as a DoubleGrid object.
 o getValues()
Returns the input values.
 o getValues(int, int)
Return a specific chart value identified by a row and column index.
 o removePropertyChangeListener(PropertyChangeListener)
 o setMaxOutputColumns(int)
Sets the number of columns in the output.
 o setReducingRule(int)
Sets the algorithm used to reduce the data.
 o setValueGrid(DoubleGrid)
Sets the input values as a DoubleGrid object.
 o setValues(double[][])
Sets the input values.
 o setValues(int, int, double)
Set a single value to be displayed by the chart, identified by row and column index numbers.

Variables

 o FIRST
 public static final int FIRST
Gets first x columns

 o MIDDLE
 public static final int MIDDLE
Gets middle x columns

 o LAST
 public static final int LAST
Gets last x columns

 o FILTER
 public static final int FILTER
Gets x columns at regular intervals

 o SMOOTH
 public static final int SMOOTH
Averages regular groups of columns

Constructors

 o ChartDataReducer
 public ChartDataReducer()

Methods

 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener l)
 o copyright
 public static String copyright()
 o getMaxOutputColumns
 public int getMaxOutputColumns()
Returns the number of columns which will form the output

Returns:
int
 o getOutputValueGrid
 public DoubleGrid getOutputValueGrid()
Returns the output produced after the reduction of the input as a DoubleGrid object. This method is provided primarily for property editors. When wiring beans or using the API, use the alternative method getOutputValues.

Returns:
DoubleGrid
See Also:
getOutputValues
 o getOutputValues
 public double[][] getOutputValues()
Returns the output produced after the reduction of the input

Returns:
double[][]
 o getReducingRule
 public int getReducingRule()
Returns a value representing the algorithm selected to reduce the data.

Returns:
int
 o getValueGrid
 public DoubleGrid getValueGrid()
Gets the input values as a DoubleGrid object. This method is provided primarily for property editors. When wiring beans or using the API, use the alternative method getValues.

Returns:
com.ibm.eou.swingchart.DoubleGrid
See Also:
getValues
 o getValues
 public double[][] getValues()
Returns the input values.

Returns:
double[][]
 o getValues
 public double getValues(int rowIndex,
                         int columnIndex)
Return a specific chart value identified by a row and column index.

Parameters:
rowIndex - 0 based row index
columnIndex - 0 based column index
Returns:
value
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
 o setMaxOutputColumns
 public void setMaxOutputColumns(int newValue)
Sets the number of columns in the output.

Parameters:
newValue - int
 o setReducingRule
 public void setReducingRule(int newValue)
Sets the algorithm used to reduce the data.

Parameters:
newValue - int
See Also:
FIRST, MIDDLE, LAST, FILTER, SMOOTH
 o setValueGrid
 public void setValueGrid(DoubleGrid dg)
Sets the input values as a DoubleGrid object. This method is provided primarily for property editors. When wiring beans or using the API, use the alternative method setValues.

Parameters:
dg - com.ibm.eou.swingchart.DoubleGrid
See Also:
setValues
 o setValues
 public void setValues(double newValue[][])
Sets the input values.

Parameters:
newValue - double[][]
 o setValues
 public void setValues(int rowIndex,
                       int columnIndex,
                       double value)
Set a single value to be displayed by the chart, identified by row and column index numbers.

If the specified row or column index is larger than the number of rows and columns in the current values array, the array is resized by inserting an appropriate number of new values initialized to 0.

Parameters:
rowIndex - 0 based row index
columnIndex - 0 based column index
value - value

All Packages  Class Hierarchy  This Package  Previous  Next  Index