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:
- FIRST - Returns the first n columns of the input
- MIDDLE - Returns the middle n columns of the input
- LAST - Returns the last n columns of the input
- FILTER - Returns columns from the input at regular intervals to produce n columns of output
- SMOOTH - Returns columns which are averages of regular groups of columns from the input to produce n columns of output
Where the value n is taken from the MaxOutputColumns property
-
FILTER
- Gets x columns at regular intervals
-
FIRST
- Gets first x columns
-
LAST
- Gets last x columns
-
MIDDLE
- Gets middle x columns
-
SMOOTH
- Averages regular groups of columns
-
ChartDataReducer()
-
-
addPropertyChangeListener(PropertyChangeListener)
-
-
copyright()
-
-
getMaxOutputColumns()
- Returns the number of columns which will form the output
-
getOutputValueGrid()
- Returns the output produced after the reduction of the input as a DoubleGrid object.
-
getOutputValues()
- Returns the output produced after the reduction of the input
-
getReducingRule()
- Returns a value representing the algorithm selected to reduce the data.
-
getValueGrid()
- Gets the input values as a DoubleGrid object.
-
getValues()
- Returns the input values.
-
getValues(int, int)
- Return a specific chart value identified by a row and column index.
-
removePropertyChangeListener(PropertyChangeListener)
-
-
setMaxOutputColumns(int)
- Sets the number of columns in the output.
-
setReducingRule(int)
- Sets the algorithm used to reduce the data.
-
setValueGrid(DoubleGrid)
- Sets the input values as a DoubleGrid object.
-
setValues(double[][])
- Sets the input values.
-
setValues(int, int, double)
- Set a single value to be displayed by the chart, identified by row and column
index numbers.
FIRST
public static final int FIRST
- Gets first x columns
MIDDLE
public static final int MIDDLE
- Gets middle x columns
LAST
public static final int LAST
- Gets last x columns
FILTER
public static final int FILTER
- Gets x columns at regular intervals
SMOOTH
public static final int SMOOTH
- Averages regular groups of columns
ChartDataReducer
public ChartDataReducer()
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
copyright
public static String copyright()
getMaxOutputColumns
public int getMaxOutputColumns()
- Returns the number of columns which will form the output
- Returns:
- int
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
getOutputValues
public double[][] getOutputValues()
- Returns the output produced after the reduction of the input
- Returns:
- double[][]
getReducingRule
public int getReducingRule()
- Returns a value representing the algorithm selected to reduce the data.
- Returns:
- int
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
getValues
public double[][] getValues()
- Returns the input values.
- Returns:
- double[][]
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
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
setMaxOutputColumns
public void setMaxOutputColumns(int newValue)
- Sets the number of columns in the output.
- Parameters:
- newValue - int
setReducingRule
public void setReducingRule(int newValue)
- Sets the algorithm used to reduce the data.
- Parameters:
- newValue - int
- See Also:
- FIRST, MIDDLE, LAST, FILTER, SMOOTH
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
setValues
public void setValues(double newValue[][])
- Sets the input values.
- Parameters:
- newValue - double[][]
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