|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.axis.Axis | +--org.jfree.chart.axis.ValueAxis | +--org.jfree.chart.axis.NumberAxis | +--org.jfree.chart.axis.VerticalNumberAxis | +--org.jfree.chart.axis.VerticalSymbolicAxis
A standard linear value axis, for SYMBOLIC values displayed vertically.
Field Summary | |
static java.awt.Paint |
DEFAULT_SYMBOLIC_GRID_LINE_PAINT
The default symbolic grid line paint. |
Fields inherited from class org.jfree.chart.axis.VerticalNumberAxis |
DEFAULT_VERTICAL_LABEL |
Fields inherited from class org.jfree.chart.axis.NumberAxis |
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT |
Fields inherited from class org.jfree.chart.axis.ValueAxis |
DEFAULT_AUTO_RANGE, DEFAULT_AUTO_RANGE_MINIMUM_SIZE, DEFAULT_AUTO_TICK_UNIT_SELECTION, DEFAULT_INVERTED, DEFAULT_LOWER_BOUND, DEFAULT_LOWER_MARGIN, DEFAULT_RANGE, DEFAULT_UPPER_BOUND, DEFAULT_UPPER_MARGIN, MAXIMUM_TICK_COUNT |
Constructor Summary | |
VerticalSymbolicAxis(java.lang.String label,
java.lang.String[] sv)
Constructs a vertical symbolic axis, using default attribute values where necessary. |
Method Summary | |
protected void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea,
int location)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
void |
drawSymbolicGridLines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea)
Draws the symbolic grid lines. |
void |
drawSymbolicGridLines(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea,
boolean firstGridLineIsDark)
Draws the symbolic grid lines. |
java.awt.geom.Rectangle2D.Double |
getSymbolicGridLine(int position)
Get the symbolic grid line corresponding to the specified position. |
java.awt.Paint |
getSymbolicGridPaint()
Returns the symbolic grid line color. |
java.lang.String[] |
getSymbolicValue()
Returns the list of the symbolic values to display. |
boolean |
isGridLinesVisible()
Returns true if the symbolic grid lines are showing, and
false otherwise. |
void |
refreshTicks(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
int location)
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
protected void |
selectAutoTickUnit(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea)
This operation is not supported by the symbolic values |
void |
setAnchoredRange(double range)
Redefinition of setAnchoredRange for the symbolicvalues. |
void |
setSymbolicGridLinesVisible(boolean flag)
Sets the visibility of the symbolic grid lines and notifies registered listeners that the axis has been modified. |
java.lang.String |
valueToString(double value)
Converts a value to a string, using the list of symbolic values. |
Methods inherited from class org.jfree.chart.axis.VerticalNumberAxis |
configure, isCompatiblePlot, isVerticalLabel, reserveWidth, reserveWidth, setVerticalLabel, translateJava2DtoValue, translateValueToJava2D |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jfree.chart.axis.VerticalAxis |
reserveWidth, reserveWidth |
Field Detail |
public static final java.awt.Paint DEFAULT_SYMBOLIC_GRID_LINE_PAINT
Constructor Detail |
public VerticalSymbolicAxis(java.lang.String label, java.lang.String[] sv)
label
- the axis label (null
permitted).sv
- the list of symbolic value to display instead of the numeric value.Method Detail |
public java.lang.String[] getSymbolicValue()
public java.awt.Paint getSymbolicGridPaint()
public boolean isGridLinesVisible()
true
if the symbolic grid lines are showing, and
false
otherwise.
true
if the symbolic grid lines are showing.public void setSymbolicGridLinesVisible(boolean flag)
flag
- the new setting.public java.lang.String valueToString(double value)
value
- value to convert.
public void refreshTicks(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, int location)
refreshTicks
in class VerticalNumberAxis
g2
- the graphics device.plotArea
- the area in which the plot and the axes should be drawn.dataArea
- the area in which the plot should be drawn.location
- the location of the axis.public void setAnchoredRange(double range)
setAnchoredRange
in class ValueAxis
range
- the new range.protected void selectAutoTickUnit(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea)
selectAutoTickUnit
in class VerticalNumberAxis
g2
- the graphics device.drawArea
- the area in which the plot and axes should be drawn.plotArea
- the area in which the plot should be drawn.public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea, int location)
draw
in class VerticalNumberAxis
g2
- the graphics device.drawArea
- the area within which the chart should be drawn.plotArea
- the area within which the plot should be drawn (a
subset of the drawArea).location
- the axis location.public void drawSymbolicGridLines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea)
The colors are consecutively the color specified by
symbolicGridPaint
(
DEFAULT_SYMBOLIC_GRID_LINE_PAINT
by default) and white.
g2
- the graphics device.drawArea
- the area within which the chart should be drawn.plotArea
- the area within which the plot should be drawn (a subset
of the drawArea).
public void drawSymbolicGridLines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea, boolean firstGridLineIsDark)
The colors are consecutively the color specified by
symbolicGridPaint
(
DEFAULT_SYMBOLIC_GRID_LINE_PAINT
by default) and white.
or if firstGridLineIsDark
is true
white and
the color specified by symbolicGridPaint
.
g2
- the graphics device.drawArea
- the area within which the chart should be drawn.plotArea
- the area within which the plot should be drawn (a
subset of the drawArea).firstGridLineIsDark
- True: the first symbolic grid line take the
color of symbolicGridPaint
.
False: the first symbolic grid line is white.
public java.awt.geom.Rectangle2D.Double getSymbolicGridLine(int position)
position
- position of the grid line, startinf from 0.
protected void autoAdjustRange()
autoAdjustRange
in class VerticalNumberAxis
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |