add
public void add(XYPlot subplot)
Adds a subplot (with a default 'weight' of 1) and sends a
PlotChangeEvent
to all registered listeners.
The domain axis for the subplot will be set to
null
. You
must ensure that the subplot has a non-null range axis.
subplot
- the subplot (null
not permitted).
add
public void add(XYPlot subplot,
int weight)
Adds a subplot with the specified weight and sends a
PlotChangeEvent
to all registered listeners. The weight
determines how much space is allocated to the subplot relative to all
the other subplots.
The domain axis for the subplot will be set to
null
. You
must ensure that the subplot has a non-null range axis.
subplot
- the subplot (null
not permitted).weight
- the weight (must be >= 1).
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of the annotation.
- clone in interface XYPlot
draw
public void draw(Graphics2D g2,
Rectangle2D area,
Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot within the specified area on a graphics device.
- draw in interface XYPlot
g2
- the graphics device.area
- the plot area (in Java2D space).anchor
- an anchor point in Java2D space (null
permitted).parentState
- the state from the parent plot, if there is one
(null
permitted).info
- collects chart drawing information (null
permitted).
equals
public boolean equals(Object obj)
Tests this plot for equality with another object.
- equals in interface XYPlot
findSubplot
public XYPlot findSubplot(PlotRenderingInfo info,
Point2D source)
Returns the subplot (if any) that contains the (x, y) point (specified
in Java2D space).
info
- the chart rendering info (null
not permitted).source
- the source point (null
not permitted).
- A subplot (possibly
null
).
getGap
public double getGap()
Returns the gap between subplots, measured in Java2D units.
- The gap (in Java2D units).
getSubplots
public List getSubplots()
Returns the list of subplots.
- An unmodifiable list of subplots.
handleClick
public void handleClick(int x,
int y,
PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values.
- handleClick in interface XYPlot
x
- x-coordinate, where the click occured.y
- y-coordinate, where the click occured.info
- object containing information about the plot dimensions.
remove
public void remove(XYPlot subplot)
Removes a subplot from the combined chart and sends a
PlotChangeEvent
to all registered listeners.
subplot
- the subplot (null
not permitted).
setGap
public void setGap(double gap)
Sets the amount of space between subplots and sends a
PlotChangeEvent
to all registered listeners.
gap
- the gap between subplots (in Java2D units).
setOrientation
public void setOrientation(PlotOrientation orientation)
Sets the orientation for the plot (also changes the orientation for all
the subplots to match).
- setOrientation in interface XYPlot
orientation
- the orientation (null
not allowed).
setRenderer
public void setRenderer(XYItemRenderer renderer)
Sets the item renderer FOR ALL SUBPLOTS. Registered listeners are
notified that the plot has been modified.
Note: usually you will want to set the renderer independently for each
subplot, which is NOT what this method does.
- setRenderer in interface XYPlot
renderer
- the new renderer.
zoomRangeAxes
public void zoomRangeAxes(double lowerPercent,
double upperPercent,
PlotRenderingInfo info,
Point2D source)
Zooms in on the range axes.
- zoomRangeAxes in interface Zoomable
- zoomRangeAxes in interface XYPlot
lowerPercent
- the lower bound.upperPercent
- the upper bound.info
- the plot rendering info (null
not permitted).source
- the source point (null
not permitted).
zoomRangeAxes
public void zoomRangeAxes(double factor,
PlotRenderingInfo info,
Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
- zoomRangeAxes in interface Zoomable
- zoomRangeAxes in interface XYPlot
factor
- the zoom factor.info
- the plot rendering info (null
not permitted).source
- the source point (null
not permitted).