|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectli.netcat.chart.data.AbstractChartModelAdapter
li.netcat.chart.data.DefaultStackModel
Default implementation of the StackModel interface.
| Field Summary | |
static int |
STACK_STRATEGY_APPEND
Equal to ChartConstants.STACK_STRATEGY_APPEND |
static int |
STACK_STRATEGY_GROUP
Equal to ChartConstants.STACK_STRATEGY_GROUP |
static int |
STACK_TYPE_NOT_STACKED
Equal to ChartConstants.STACK_TYPE_NOT_STACKED |
static int |
STACK_TYPE_STACKED
Equal to ChartConstants.STACK_TYPE_STACKED |
static int |
STACK_TYPE_STACKED_PERCENT
Equal to ChartConstants.STACK_TYPE_STACKED_PERCENT |
| Constructor Summary | |
DefaultStackModel(int stackType,
int stackStrategy)
Constructs a new instance of a DefaultStackModel using the given stack type and stack strategy. |
|
| Method Summary | |
void |
addStackModelListener(StackModelListener listener)
Adds a stack model listener to the list of listeners. |
int |
getColumnCount()
Returns the number of data columns. |
boolean |
getIncludeZero()
Returns true if the zero value gets included. |
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. |
int |
getStackStrategy()
Returns the strategy of this stack model. |
int |
getStackType()
Returns the type of the stack. |
double |
getTrail(int rowIndex,
int columnIndex)
Returns the trail value of a given data cell. |
void |
invalidate()
Invoked when the underlying model changes. |
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. |
void |
setIncludeZero(boolean include)
Specifies, whether to include the zero value or not. |
void |
setStackStrategy(int stackStrategy)
Sets the strategy of the stack to the given value. |
void |
setStackType(int stackType)
Sets the type of the stack to the given value. |
| Methods inherited from class li.netcat.chart.data.AbstractChartModelAdapter |
getChartModel, setChartModel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface li.netcat.chart.data.ChartModelAdapter |
getChartModel, setChartModel |
| Field Detail |
public static final int STACK_TYPE_NOT_STACKED
ChartConstants.STACK_TYPE_NOT_STACKED
public static final int STACK_TYPE_STACKED
ChartConstants.STACK_TYPE_STACKED
public static final int STACK_TYPE_STACKED_PERCENT
ChartConstants.STACK_TYPE_STACKED_PERCENT
public static final int STACK_STRATEGY_APPEND
ChartConstants.STACK_STRATEGY_APPEND
public static final int STACK_STRATEGY_GROUP
ChartConstants.STACK_STRATEGY_GROUP
| Constructor Detail |
public DefaultStackModel(int stackType,
int stackStrategy)
DefaultStackModel using the given stack type and stack strategy.
stackType - The type of the stack, specify one of STACK_TYPE_NOT_STACKED,
STACK_TYPE_STACKED or STACK_TYPE_STACKED_PERCENT.stackStrategy - The strategy of the stack, specify one of STACK_STRATEGY_APPEND or STACK_STRATEGY_GROUP.| Method Detail |
public int getStackType()
STACK_TYPE_NOT_STACKED, STACK_TYPE_STACKED or STACK_TYPE_STACKED_PERCENT.public void setStackType(int stackType)
stackType - The type of the stack, specify one of STACK_TYPE_NOT_STACKED,
STACK_TYPE_STACKED or STACK_TYPE_STACKED_PERCENT.public int getStackStrategy()
STACK_STRATEGY_APPEND, STACK_STRATEGY_GROUP or another custom strategy.public void setStackStrategy(int stackStrategy)
stackStrategy - The strategy of the stack, specify one of STACK_STRATEGY_APPEND or STACK_STRATEGY_GROUP.public boolean getIncludeZero()
true if the zero value gets included.
true, if the zero value gets included.public void setIncludeZero(boolean include)
include - Specify true to include the zero value.public boolean isStacked()
StackModeltrue if the values in this model are stacked.
isStacked in interface StackModeltrue if the values in this model are stacked..public boolean isRelative()
StackModeltrue if the values in this model are in percent.
isRelative in interface StackModeltrue if the values in this model are in percent.public double getMinValue()
StackModel
getMinValue in interface StackModelpublic double getMaxValue()
StackModel
getMaxValue in interface StackModelpublic int getRowCount()
StackModel
getRowCount in interface StackModelpublic int getColumnCount()
StackModel
getColumnCount in interface StackModel
public double getLead(int rowIndex,
int columnIndex)
StackModel
getLead in interface StackModelrowIndex - The index of the row of the underlying cell.columnIndex - The index of the column of the underlying cell.
NaN if the underlying cell does not contain a numeric value.
public double getTrail(int rowIndex,
int columnIndex)
StackModel
getTrail in interface StackModelrowIndex - The index of the row of the underlying cell.columnIndex - The index of the column of the underlying cell.
NaN if the underlying cell does not contain a numeric value.public void addStackModelListener(StackModelListener listener)
StackModel
addStackModelListener in interface StackModelpublic void removeStackModelListener(StackModelListener listener)
StackModel
removeStackModelListener in interface StackModellistener - A listener that has been added.public void invalidate()
AbstractChartModelAdapter
invalidate in class AbstractChartModelAdapter
|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||