|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jfree.chart.axis.Axis
org.jfree.chart.axis.ValueAxis
org.jfree.chart.axis.NumberAxis
org.jfree.chart.axis.SymbolAxis
A standard linear value axis that replaces integer values with symbols.
| Field Summary | |
static java.awt.Paint |
DEFAULT_GRID_BAND_PAINT
The default grid band paint. |
| Fields inherited from class org.jfree.chart.axis.NumberAxis |
DEFAULT_AUTO_RANGE_INCLUDES_ZERO, DEFAULT_AUTO_RANGE_STICKY_ZERO, DEFAULT_TICK_UNIT, DEFAULT_VERTICAL_TICK_LABELS |
| 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 | |
SymbolAxis(java.lang.String label,
java.lang.String[] sv)
Constructs a symbol axis, using default attribute values where necessary. |
|
| Method Summary | |
protected void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible. |
AxisState |
draw(java.awt.Graphics2D g2,
double cursor,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
PlotRenderingInfo plotState)
Draws the axis on a Java 2D graphics device (such as the screen or a printer). |
protected void |
drawGridBands(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
java.util.List ticks)
Draws the grid bands. |
protected void |
drawGridBandsHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
boolean firstGridBandIsDark,
java.util.List ticks)
Draws the grid bands for the axis when it is at the top or bottom of the plot. |
protected void |
drawGridBandsVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea,
boolean firstGridBandIsDark,
java.util.List ticks)
Draws the grid bands for the axis when it is at the top or bottom of the plot. |
boolean |
equals(java.lang.Object obj)
Tests this axis for equality with an arbitrary object. |
java.awt.Paint |
getGridBandPaint()
Returns the paint used to color the grid bands. |
java.lang.String[] |
getSymbols()
Returns an array of the symbols for the axis. |
boolean |
isGridBandsVisible()
Returns true if the grid bands are showing, and
false otherwise. |
java.util.List |
refreshTicks(java.awt.Graphics2D g2,
AxisState state,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
protected java.util.List |
refreshTicksHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing). |
protected java.util.List |
refreshTicksVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
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 dataArea,
org.jfree.ui.RectangleEdge edge)
This operation is not supported by this axis. |
void |
setGridBandPaint(java.awt.Paint paint)
Sets the grid band paint and sends an AxisChangeEvent to
all registered listeners. |
void |
setGridBandsVisible(boolean flag)
Sets the visibility of the grid bands 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 symbols. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.awt.Paint DEFAULT_GRID_BAND_PAINT
| Constructor Detail |
public SymbolAxis(java.lang.String label,
java.lang.String[] sv)
label - the axis label (null permitted).sv - the list of symbols to display instead of the numeric
values.| Method Detail |
public java.lang.String[] getSymbols()
public java.awt.Paint getGridBandPaint()
null).setGridBandPaint(Paint),
isGridBandsVisible()public void setGridBandPaint(java.awt.Paint paint)
AxisChangeEvent to
all registered listeners.
paint - the paint (null not permitted).getGridBandPaint()public boolean isGridBandsVisible()
true if the grid bands are showing, and
false otherwise.
true if the grid bands are showing, and
false otherwise.setGridBandsVisible(boolean)public void setGridBandsVisible(boolean flag)
flag - the new setting.isGridBandsVisible()
protected void selectAutoTickUnit(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
selectAutoTickUnit in class NumberAxisg2 - the graphics device.dataArea - the area in which the plot and axes should be drawn.edge - the edge along which the axis is drawn.
public AxisState draw(java.awt.Graphics2D g2,
double cursor,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
PlotRenderingInfo plotState)
draw in class NumberAxisg2 - the graphics device (null not permitted).cursor - the cursor location.plotArea - the area within which the plot and axes should be drawn
(null not permitted).dataArea - the area within which the data should be drawn
(null not permitted).edge - the axis location (null not permitted).plotState - collects information about the plot
(null permitted).
null).
protected void drawGridBands(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge,
java.util.List ticks)
gridBandPaint (DEFAULT_GRID_BAND_PAINT by
default).
- Parameters:
g2 - the graphics device.plotArea - the area within which the chart should be drawn.dataArea - the area within which the plot should be drawn (a
subset of the drawArea).edge - the axis location.ticks - the ticks.
protected void drawGridBandsHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
boolean firstGridBandIsDark,
java.util.List ticks)
g2 - the graphics device.plotArea - the area within which the chart should be drawn.dataArea - the area within which the plot should be drawn
(a subset of the drawArea).firstGridBandIsDark - True: the first grid band takes the
color of gridBandPaint.
False: the second grid band takes the
color of gridBandPaint.ticks - the ticks.
protected void drawGridBandsVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea,
boolean firstGridBandIsDark,
java.util.List ticks)
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).firstGridBandIsDark - True: the first grid band takes the
color of gridBandPaint.
False: the second grid band takes the
color of gridBandPaint.ticks - a list of ticks.protected void autoAdjustRange()
autoAdjustRange in class NumberAxis
public java.util.List refreshTicks(java.awt.Graphics2D g2,
AxisState state,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
refreshTicks in class NumberAxisg2 - the graphics device.state - the axis state.dataArea - the area in which the data should be drawn.edge - the location of the axis.
protected java.util.List refreshTicksHorizontal(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
refreshTicksHorizontal in class NumberAxisg2 - the graphics device.dataArea - the area in which the data should be drawn.edge - the location of the axis.
protected java.util.List refreshTicksVertical(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
org.jfree.ui.RectangleEdge edge)
refreshTicksVertical in class NumberAxisg2 - the graphics device.dataArea - the area in which the plot should be drawn.edge - the location of the axis.
public java.lang.String valueToString(double value)
value - value to convert.
public boolean equals(java.lang.Object obj)
equals in class NumberAxisobj - the object (null permitted).
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||