ChartCat 1.2

li.netcat.chart.data
Interface StackModel

All Superinterfaces:
ChartModelAdapter
All Known Implementing Classes:
DefaultStackModel

public interface StackModel
extends ChartModelAdapter

The StackModel adapts a chart model and calculates the lead and the tail of each numeric value in the model. Imagine a stacked bar chart: Each cell in the model gets its bar and each bar starts at a certain value (=trail) and ends at a certain value (=lead). In a line chart, only the lead values are of interest.

The strategy of a stack model defines how negative values get handled.

Author:
Arthur Marxer

Method Summary
 void addStackModelListener(StackModelListener listener)
          Adds a stack model listener to the list of listeners.
 int getColumnCount()
          Returns the number of data columns.
 double getLead(int rowIndex, int columnIndex)
          Returns the lead value of a given data cell.
 double getMaxValue()
          Returns the maximum value of all leads and trails.
 double getMinValue()
          Returns the minimum value of all leads and trails.
 int getRowCount()
          Returns the number of data rows.
 double getTrail(int rowIndex, int columnIndex)
          Returns the trail value of a given data cell.
 boolean isRelative()
          Returns true if the values in this model are in percent.
 boolean isStacked()
          Returns true if the values in this model are stacked.
 void removeStackModelListener(StackModelListener listener)
          Removes a stack model listener from the list of listeners.
 
Methods inherited from interface li.netcat.chart.data.ChartModelAdapter
getChartModel, setChartModel
 

Method Detail

isStacked

public boolean isStacked()
Returns true if the values in this model are stacked.

Returns:
true if the values in this model are stacked..

isRelative

public boolean isRelative()
Returns true if the values in this model are in percent.

Returns:
true if the values in this model are in percent.

getMinValue

public double getMinValue()
Returns the minimum value of all leads and trails.

Returns:
The minimum value of all leads and trails.

getMaxValue

public double getMaxValue()
Returns the maximum value of all leads and trails.

Returns:
The maximum value of all leads and trails.

getRowCount

public int getRowCount()
Returns the number of data rows. This value must not necessarily be equal to the number of data rows of the underlying model.

Returns:
The number of rows.

getColumnCount

public int getColumnCount()
Returns the number of data columns. This value must not necessarily be equal to the number of data columns of the underlying model.

Returns:
The number of rows.

getLead

public double getLead(int rowIndex,
                      int columnIndex)
Returns the lead value of a given data cell.

Parameters:
rowIndex - The index of the row of the underlying cell.
columnIndex - The index of the column of the underlying cell.
Returns:
The lead value or NaN if the underlying cell does not contain a numeric value.

getTrail

public double getTrail(int rowIndex,
                       int columnIndex)
Returns the trail value of a given data cell.

Parameters:
rowIndex - The index of the row of the underlying cell.
columnIndex - The index of the column of the underlying cell.
Returns:
The lead value or NaN if the underlying cell does not contain a numeric value.

addStackModelListener

public void addStackModelListener(StackModelListener listener)
Adds a stack model listener to the list of listeners. The listeners are notified whenever a value in this model changes.


removeStackModelListener

public void removeStackModelListener(StackModelListener listener)
Removes a stack model listener from the list of listeners.

Parameters:
listener - A listener that has been added.

ChartCat 1.2

Copyright 2003 - 2005 NetCat Inc.. All rights reserved. Feedback

Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print, Chart,Charting,Charts,Java,Java Chart,Java Charting,Java Charts,Chart Java,Charts Java,3D,3D Chart,3Dchart,Graph,Graphs,Chart Graph,Java Graph,Diagram,Diagrams,Java Diagram,Java Diagrams,Curve,Curves,Bar Chart,Pie Chart,Line Chart,Area Chart,Bar Graph,Pie Graph,Line Graph,Java Diagram,Chart Diagram,Package,Library,Chart Library,Chart Engine,Chart Package,Graph Package,Paint,Support,Graphic,Graphics,Print