|
||||||||||
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.DateAxis | +--org.jfree.chart.axis.VerticalDateAxis
A vertical axis that displays dates.
Field Summary |
Fields inherited from class org.jfree.chart.axis.DateAxis |
DEFAULT_ANCHOR_DATE, DEFAULT_AUTO_RANGE_MINIMUM_SIZE_IN_MILLISECONDS, DEFAULT_DATE_RANGE, DEFAULT_DATE_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 | |
VerticalDateAxis(java.lang.String label)
Constructs a new date axis, using default attribute values where necessary. |
Method Summary | |
protected void |
autoAdjustRange()
Rescales the axis to ensure that all data is visible. |
void |
configure()
Configures the axis to work with the specified plot. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
int location)
Draws the axis on a Java 2D graphics device (such as the screen or a printer). |
protected boolean |
isCompatiblePlot(Plot plot)
Checks the compatibility of a plot with this type of axis, returning true if the plot is compatible and false otherwise. |
boolean |
isVerticalLabel()
Returns a flag indicating whether or not the axis label is drawn vertically. |
void |
refreshTicks(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D dataArea,
int location)
Recalculates the ticks for the date axis. |
double |
reserveWidth(java.awt.Graphics2D g2,
Plot plot,
java.awt.geom.Rectangle2D drawArea,
int location)
Returns the width required to draw the axis in the specified draw area. |
double |
reserveWidth(java.awt.Graphics2D g2,
Plot plot,
java.awt.geom.Rectangle2D plotArea,
int location,
double reservedHeight,
int horizontalAxisLocation)
Returns area in which the axis will be displayed. |
protected void |
selectAutoTickUnit(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D drawArea,
java.awt.geom.Rectangle2D plotArea)
Selects an appropriate tick value for the axis. |
void |
setVerticalLabel(boolean flag)
Sets a flag indicating whether or not the axis label is drawn vertically. |
double |
translateDateToJava2D(java.util.Date date,
java.awt.geom.Rectangle2D dataArea)
Translates a date to Java2D coordinates, based on the range displayed by this axis for the specified data area. |
double |
translateJava2DtoValue(float java2DValue,
java.awt.geom.Rectangle2D dataArea)
Translates the Java2D (vertical) coordinate back to the corresponding data value. |
double |
translateValueToJava2D(double value,
java.awt.geom.Rectangle2D dataArea)
Translates the data value to the display coordinates (Java 2D User Space) of the chart. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VerticalDateAxis(java.lang.String label)
label
- the axis label (null
permitted).Method Detail |
public boolean isVerticalLabel()
true
or false
.public void setVerticalLabel(boolean flag)
If the flag is changed, an AxisChangeEvent
is sent to all registered listeners.
flag
- the new flag.public void configure()
configure
in class Axis
public double translateDateToJava2D(java.util.Date date, java.awt.geom.Rectangle2D dataArea)
date
- the date.dataArea
- the rectangle (in Java2D space) where the data is to be plotted.
public double translateValueToJava2D(double value, java.awt.geom.Rectangle2D dataArea)
translateValueToJava2D
in class ValueAxis
value
- the date to be plotted.dataArea
- the rectangle (in Java2D space) where the data is to be plotted.
public double translateJava2DtoValue(float java2DValue, java.awt.geom.Rectangle2D dataArea)
translateJava2DtoValue
in class ValueAxis
java2DValue
- the coordinate in Java2D space.dataArea
- the rectangle (in Java2D space) where the data is to be plotted.
protected void autoAdjustRange()
autoAdjustRange
in class ValueAxis
public void refreshTicks(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, int location)
refreshTicks
in class Axis
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 draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, int location)
draw
in class Axis
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).location
- the axis location.public double reserveWidth(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D drawArea, int location)
reserveWidth
in interface VerticalAxis
g2
- the graphics device.plot
- a reference to the plot;drawArea
- the area within which the plot should be drawn.location
- the axis location.
public double reserveWidth(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D plotArea, int location, double reservedHeight, int horizontalAxisLocation)
reserveWidth
in interface VerticalAxis
g2
- the graphics device.plot
- a reference to the plot.plotArea
- the area in which the plot and axes should be drawn.location
- the axis location.reservedHeight
- the height reserved for the horizontal axis.horizontalAxisLocation
- the horizontal axis location.
protected void selectAutoTickUnit(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, java.awt.geom.Rectangle2D plotArea)
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.protected boolean isCompatiblePlot(Plot plot)
The VerticalDateAxis class required the plot to implement the VerticalValuePlot interface.
isCompatiblePlot
in class Axis
plot
- the plot.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |