|
||||||||||
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.HorizontalCategoryPlot
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 horizontal
axis and the categories are plotted along the vertical axis. The VerticalCategoryPlot
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 | |
HorizontalCategoryPlot(CategoryDataset data,
CategoryAxis domainAxis,
ValueAxis rangeAxis,
CategoryItemRenderer renderer)
Constructs a horizontal category plot. |
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). |
Range |
getHorizontalDataRange(ValueAxis axis)
Returns the range of data values that will be plotted against the range axis. |
ValueAxis |
getHorizontalValueAxis()
Returns the horizontal axis. |
java.lang.String |
getPlotType()
Returns a short string describing the type of plot. |
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 data in the secondary dataset (if there is one) 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 HorizontalCategoryPlot(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 boolean isCompatibleHorizontalAxis(Axis axis)
axis
- the proposed horizontal axis.
true
if the axis is compatible with the plot.public boolean isCompatibleVerticalAxis(Axis axis)
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.
true
if the axis is compatible with the plot.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 getHorizontalDataRange(ValueAxis axis)
If the dataset is null
, this method returns null
.
getHorizontalDataRange
in interface HorizontalValuePlot
axis
- the axis.
public ValueAxis getHorizontalValueAxis()
This method supports the HorizontalValuePlot interface.
getHorizontalValueAxis
in interface HorizontalValuePlot
public void handleClick(int x, int y, ChartRenderingInfo info)
handleClick
in class Plot
x
- x-coordinate of the click.y
- y-coordinate of the click.info
- an optional info collection object to return data back to the caller.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |