|
||||||||||
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.XYPlot | +--org.jfree.chart.plot.OverlaidXYPlot
An extension of XYPlot that allows multiple XYPlots to be overlaid in one space, using common axes.
Field Summary |
Fields inherited from class org.jfree.chart.plot.XYPlot |
DEFAULT_CROSSHAIR_PAINT, DEFAULT_CROSSHAIR_STROKE, DEFAULT_CROSSHAIR_VISIBLE, DEFAULT_GRIDLINE_PAINT, DEFAULT_GRIDLINE_STROKE |
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 |
Constructor Summary | |
OverlaidXYPlot(java.lang.String domainAxisLabel,
java.lang.String rangeAxisLabel)
Constructs a new overlaid XY plot. |
|
OverlaidXYPlot(ValueAxis domain,
ValueAxis range)
Constructs a new overlaid plot (with no subplots initially). |
Method Summary | |
void |
add(XYPlot subplot)
Adds a subplot. |
Range |
getHorizontalDataRange(ValueAxis axis)
Returns the horizontal (x-axis) data range. |
LegendItemCollection |
getLegendItems()
Returns a collection of legend items for the overlaid plot. |
java.lang.String |
getPlotType()
Returns a string representing the plot type. |
Range |
getVerticalDataRange(ValueAxis axis)
Returns the vertical (y-axis) data range. |
void |
remove(XYPlot subplot)
Removes a subplot from the overlaid chart. |
void |
render(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D dataArea,
ChartRenderingInfo info,
CrosshairInfo crosshairInfo)
Renders the subplots. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OverlaidXYPlot(java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel)
After creating a new OverlaidXYPlot, you need to add some subplots.
No dataset is required, because each of the subplots maintains its own dataset.
This constructor is provided for convenience. If you need greater control over the axes, use another constructor.
domainAxisLabel
- the label for the domain axis.rangeAxisLabel
- the label for the range axis.public OverlaidXYPlot(ValueAxis domain, ValueAxis range)
domain
- horizontal axis to use for all sub-plots.range
- vertical axis to use for all sub-plots.Method Detail |
public void add(XYPlot subplot)
This method sets the axes of the subplot to null
since the subplot will
use the axes from this (parent) plot.
subplot
- the subplot.public void remove(XYPlot subplot)
subplot
- the subplot.public LegendItemCollection getLegendItems()
getLegendItems
in class XYPlot
public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, CrosshairInfo crosshairInfo)
The draw(...) method inherited from XYPlot takes care of all the setup (background and axes) then calls the render(...) method.
render
in class XYPlot
g2
- the graphics device.dataArea
- the area inside the axes.info
- optional information collection.crosshairInfo
- collects information about crosshairs.public java.lang.String getPlotType()
getPlotType
in class XYPlot
public Range getHorizontalDataRange(ValueAxis axis)
getHorizontalDataRange
in interface HorizontalValuePlot
getHorizontalDataRange
in class XYPlot
axis
- the axis.
public Range getVerticalDataRange(ValueAxis axis)
getVerticalDataRange
in interface VerticalValuePlot
getVerticalDataRange
in class XYPlot
axis
- the axis.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |