|
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.PolarGraphPart
Abstract super class of all graph parts with a polar coordinate system.
The orientation of these parts can be NET or RING and can not be changed
after the construction.
Polar graphs might have a "hole" in the center like a doughnut. The (outer) radius calculates as follows: (outer)radius = inner radius + thickness.
| Field Summary | |
static int |
NET
Equal to ChartConstants.NET |
static int |
RING
Equal to ChartConstants.RING |
| 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 | |
PolarGraphPart(int stackType,
int stackStrategy,
boolean centered,
int orientation)
Constructs a new PolarGraphPart using the given parameters. |
|
| Method Summary | |
float |
getCenterX()
Returns the x-coordinate of the center of this polar graph. |
float |
getCenterY()
Returns the y-coordinate of the center of this polar graph. |
PolarConverter |
getConverter()
Returns an instance of a polar converter that can be used to transform coordinates from a Cartesian to a polar system. |
float |
getInnerRadius()
Returns the radius of the "hole" in the center of this polar graph. |
int |
getOrientation()
Returns the orientation of this polar graph. |
ScaleModel |
getRadialScaleModel()
Returns the radial scale model of this polar graph. |
float |
getRadius()
Returns the outer radius of this graph. |
float |
getStretch()
Returns the strech value in x-direction. |
ScaleModel |
getTangentialScaleModel()
Returns the tangential scale model of this polar graph. |
float |
getThickness()
Returns the difference of outer and inner radius. |
ValueLocation |
getValueLocation(int rowIndex,
int columnIndex)
Abstract function that calculates a ValueLocation for a given cell. |
void |
invalidate()
Calls invalidate() on the chart context if it's not null. |
void |
setRadialScaleModel(ScaleModel model)
Sets the radial scale model of this polar graph. |
void |
setSize(float thickness,
float innerRadius)
Sets the size of this polar graph. |
void |
setStretch(float stretch)
Sets the strech value in x-direction. |
void |
setTangentialScaleModel(ScaleModel model)
Sets the tangential scale model of this polar graph. |
| 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, 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 NET
ChartConstants.NET
public static final int RING
ChartConstants.RING
| Constructor Detail |
public PolarGraphPart(int stackType,
int stackStrategy,
boolean centered,
int orientation)
PolarGraphPart 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
NET or RING.| Method Detail |
public int getOrientation()
NET or RING.public ScaleModel getTangentialScaleModel()
null.public void setTangentialScaleModel(ScaleModel model)
model - The tangential scale model of this polar graph, not null.
If the orientation is RING, this parameter must be of type NumericScaleModel.public ScaleModel getRadialScaleModel()
null.public void setRadialScaleModel(ScaleModel model)
model - The radial scale model of this polar graph, not null.
If the orientation is NET, this parameter must be of type NumericScaleModel.public float getThickness()
public float getInnerRadius()
public void setSize(float thickness,
float innerRadius)
thickness - The thickness of the graph, that is the difference of outer and inner radius.innerRadius - The inner radius of this graph, must be >= 0.0f.public float getRadius()
public float getCenterX()
public float getCenterY()
public PolarConverter getConverter()
public float getStretch()
public void setStretch(float stretch)
stretch - The stretch value in x-direction.
public ValueLocation getValueLocation(int rowIndex,
int columnIndex)
GraphPartValueLocation for a given cell.
getValueLocation in class GraphPartrowIndex - 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.public void invalidate()
AbstractPartinvalidate() on the chart context if it's not null.
invalidate in class AbstractPart
|
ChartCat 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||