|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.chart.util.AbstractPart
li.netcat.chart.util.GraphPart
li.netcat.chart.util.CartesianGraphPart
Abstract super class of all graph parts with a Cartesian coordinate system.
The orientation of these parts can be set to HORIZONTAL
or VERTICAL
.
Field Summary | |
static int |
HORIZONTAL
Equal to ChartConstants.HORIZONTAL |
static int |
VERTICAL
Equal to ChartConstants.VERTICAL |
Fields inherited from class li.netcat.chart.util.GraphPart |
STACK_STRATEGY_APPEND, STACK_STRATEGY_GROUP, STACK_TYPE_NOT_STACKED, STACK_TYPE_STACKED, STACK_TYPE_STACKED_PERCENT |
Fields inherited from class li.netcat.chart.util.AbstractPart |
BACKGROUND, FOREGROUND, PERSPECTIVE |
Constructor Summary | |
CartesianGraphPart(int stackType,
int stackStrategy,
boolean centered,
int orientation)
Constructs a new CartesianGraphPart using the given parameters. |
Method Summary | |
float |
getHeight()
Returns the height of the underlying coordinate system. |
ScaleModel |
getHorizontalScaleModel()
Returns the scale model that defines the axis in X direction. |
int |
getOrientation()
Returns the orientation of this CartesianGraphPart . |
ValueLocation |
getValueLocation(int rowIndex,
int columnIndex)
Abstract function that calculates a ValueLocation for a given cell. |
ScaleModel |
getVerticalScaleModel()
Returns the scale model that defines the axis in Y direction. |
float |
getWidth()
Returns the width of the underlying coordinate system. |
void |
setHorizontalScaleModel(ScaleModel horizontalScaleModel)
Sets the scale model that defines the axis in X direction. |
void |
setOrientation(int orientation)
Sets the logical orientation of this CartesianGraphPart . |
void |
setSize(float width,
float height)
Sets the size of the of the underlying coordinate system. |
void |
setVerticalScaleModel(ScaleModel verticalScaleModel)
Sets the scale model that defines the axis in Y direction. |
Methods inherited from class li.netcat.chart.util.GraphPart |
getChartModel, getDiscreetLength, getDiscreetScaleModel, getGraphLook, getLegendModel, getNumericLength, getNumericScaleModel, getStackModel, setChartModel, setDiscreetLength, setDiscreetScaleModel, setGraphLook, setLegendModel, setNumericLength, setNumericScaleModel, setStackModel |
Methods inherited from class li.netcat.chart.util.AbstractPart |
getChart, getPerspective, invalidate, setChart, setPerspective |
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.Part |
getLayout |
Field Detail |
public static final int VERTICAL
ChartConstants.VERTICAL
public static final int HORIZONTAL
ChartConstants.HORIZONTAL
Constructor Detail |
public CartesianGraphPart(int stackType, int stackStrategy, boolean centered, int orientation)
CartesianGraphPart
using the given parameters.
stackType
- The type of the resulting graph. Specify one of
STACK_TYPE_NOT_STACKED
, STACK_TYPE_STACKED
or STACK_TYPE_STACKED_PERCENT
.stackStrategy
- The strategy that defines how to stack values.
Especially the handling of negative values might be different in different graphs. Specify one of STACK_STRATEGY_*.centered
- Specify true for a centered row scale model. See ScaleModel.isCentered()
for details.orientation
- The orientation of the resulting graph. Specify
HORIZONTAL
or VERTICAL
.Method Detail |
public int getOrientation()
CartesianGraphPart
.
HORIZONTAL
or VERTICAL
.public void setOrientation(int orientation)
CartesianGraphPart
. The size of the underlying coordinate
system is retained.
orientation
- Specify either HORIZONTAL
or VERTICAL
.public ScaleModel getHorizontalScaleModel()
null
and depends on the orientation.public void setHorizontalScaleModel(ScaleModel horizontalScaleModel)
horizontalScaleModel
- The horizontal scale model, not null
. If the orientation is vertical,
this argument must be an instance of NumericScaleModel
.public ScaleModel getVerticalScaleModel()
null
and depends on the orientation.public void setVerticalScaleModel(ScaleModel verticalScaleModel)
verticalScaleModel
- The vertical scale model, not null
. If the orientation is horizontal,
this argument must be an instance of NumericScaleModel
.public float getWidth()
public float getHeight()
public void setSize(float width, float height)
width
- The new width.height
- The new height.public ValueLocation getValueLocation(int rowIndex, int columnIndex)
GraphPart
ValueLocation
for a given cell.
getValueLocation
in class GraphPart
rowIndex
- The index of the row. It must lie in a valid range of the current
stack model.columnIndex
- The index of the column. It must lie in a valid range of the current
stack model.
ValueLocation
for the given cell or null
if not available.
|
ChartCat 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |