add
public void add(CategoryPlot subplot)
Adds a subplot (with a default 'weight' of 1) and sends a
PlotChangeEvent
to all registered listeners.
You must ensure that the subplot has a non-null domain axis. The range
axis for the subplot will be set to
null
.
subplot
- the subplot (null
not permitted).
add
public void add(CategoryPlot subplot,
int weight)
Adds a subplot and sends a
PlotChangeEvent
to all registered
listeners.
You must ensure that the subplot has a non-null domain axis. The range
axis for the subplot will be set to
null
.
subplot
- the subplot (null
not permitted).weight
- the weight (must be >= 1).
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of the plot.
- clone in interface CategoryPlot
draw
public void draw(Graphics2D g2,
Rectangle2D area,
Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer). Will perform all the placement calculations for each
sub-plots and then tell these to draw themselves.
- draw in interface CategoryPlot
g2
- the graphics device.area
- the area within which the plot (including axis labels)
should be drawn.anchor
- the anchor point (null
permitted).parentState
- the parent state.info
- collects information about the drawing (null
permitted).
equals
public boolean equals(Object obj)
Tests the plot for equality with an arbitrary object.
- equals in interface CategoryPlot
obj
- the object (null
permitted).
getDataRange
public Range getDataRange(ValueAxis axis)
Returns a range representing the extent of the data values in this plot
(obtained from the subplots) that will be rendered against the specified
axis. NOTE: This method is intended for internal JFreeChart use, and
is public only so that code in the axis classes can call it. Since
only the range axis is shared between subplots, the JFreeChart code
will only call this method for the range values (although this is not
checked/enforced).
- getDataRange in interface ValueAxisPlot
- getDataRange in interface CategoryPlot
getGap
public double getGap()
Returns the space between subplots.
- The gap (in Java2D units).
getSubplots
public List getSubplots()
Returns the list of subplots. The returned list may be empty, but is
never null
.
- 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 value.
- handleClick in interface CategoryPlot
x
- x-coordinate of the click.y
- y-coordinate of the click.info
- information about the plot's dimensions.
remove
public void remove(CategoryPlot subplot)
Removes a subplot from the combined chart.
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).