|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jfree.chart.plot.Plot | +--org.jfree.chart.plot.CategoryPlot | +--org.jfree.chart.plot.VerticalCategoryPlot
A general plotting class that uses data from a CategoryDataset
and renders each data
item using a CategoryItemRenderer
. In this plot, the values are plotted along the
vertical axis and the categories are plotted along the horizontal axis. The
HorizontalCategoryPlot
provides the reverse orientation.
Field Summary |
Fields inherited from class org.jfree.chart.plot.Plot |
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO |
Fields inherited from interface org.jfree.chart.plot.CategoryPlotConstants |
DEFAULT_DOMAIN_GRIDLINES_VISIBLE, DEFAULT_GRIDLINE_PAINT, DEFAULT_GRIDLINE_STROKE, DEFAULT_RANGE_GRIDLINES_VISIBLE, DEFAULT_VALUE_LABEL_FONT |
Constructor Summary | |
VerticalCategoryPlot(CategoryDataset data,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryItemRenderer renderer)
Constructs a new vertical category plot, using default attributes where necessary. |
Method Summary | |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
ChartRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer). |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
Range |
getVerticalDataRange(ValueAxis axis)
Returns the range of data values that will be plotted against the range axis. |
ValueAxis |
getVerticalValueAxis()
Returns the vertical value axis. |
void |
handleClick(int x,
int y,
ChartRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values. |
boolean |
isCompatibleDomainAxis(CategoryAxis axis)
Checks the compatibility of a domain axis, returning true if the axis is compatible with the plot, and false otherwise. |
boolean |
isCompatibleHorizontalAxis(Axis axis)
Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise. |
boolean |
isCompatibleRangeAxis(ValueAxis axis)
Checks the compatibility of a range axis, returning true if the axis is compatible with the plot, and false otherwise. |
boolean |
isCompatibleVerticalAxis(Axis axis)
Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise. |
void |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info)
Draws a representation of the data within the dataArea region, using the current renderer. |
void |
render2(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info)
Draws a representation of the secondary dataset within the dataArea region, using the current renderer. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VerticalCategoryPlot(CategoryDataset data, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
data
- the dataset.domainAxis
- the domain axis.rangeAxis
- the range axis.renderer
- the renderer for the data.Method Detail |
public ValueAxis getVerticalValueAxis()
This method supports the VerticalValuePlot interface.
getVerticalValueAxis
in interface VerticalValuePlot
public boolean isCompatibleHorizontalAxis(Axis axis)
axis
- the horizontal axis.
true
if the axis is compatible with the plot.public boolean isCompatibleVerticalAxis(Axis axis)
To be compatible with a VerticalCategoryPlot, the axis needs to implement the VerticalAxis interface *and* be a subclass of ValueAxis.
axis
- the vertical axis.
true
if the axis is compatible with the plot.public boolean isCompatibleDomainAxis(CategoryAxis axis)
isCompatibleDomainAxis
in class CategoryPlot
axis
- the proposed axis.
true
if the axis is compatible with the plot.public boolean isCompatibleRangeAxis(ValueAxis axis)
isCompatibleRangeAxis
in class CategoryPlot
axis
- the proposed axis.
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartRenderingInfo info)
At your option, you may supply an instance of ChartRenderingInfo. If you do, it will be populated with information about the drawing, including various plot dimensions and tooltip info.
draw
in class Plot
g2
- the graphics device.plotArea
- the area within which the plot (including axes) should be drawn.info
- collects info as the chart is drawn.public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info)
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.public void render2(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info)
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.public java.lang.String getPlotType()
getPlotType
in class Plot
public Range getVerticalDataRange(ValueAxis axis)
If the dataset is null
, this method returns null
.
getVerticalDataRange
in interface VerticalValuePlot
axis
- the axis.
public void handleClick(int x, int y, ChartRenderingInfo info)
handleClick
in class Plot
x
- the x coordinate.y
- the y coordinate.info
- the dimensions of the plot.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |