com.ijchart.xychart.plot
Class AbstractPlot

java.lang.Object
  extended by com.ijchart.xychart.plot.AbstractPlot
All Implemented Interfaces:
IAxisChangeListener, IDatasetChangeListener, IRenderChangeListener, IZoomable, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
AbstractAxisPlot, NoAxisPlot

public abstract class AbstractPlot
extends java.lang.Object
implements IAxisChangeListener, IDatasetChangeListener, IRenderChangeListener, IZoomable, java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

The base class for all plots in IJChart.The IJChart class delegates the drawing of axes and data to the plot.This base class provides facilities common to most plot types.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
protected  java.awt.geom.Rectangle2D dataArea
           The data area.
static float DEFAULT_BACKGROUND_ALPHA
           The default background alpha transparency.
static Align DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
           The default background image alignment.
static java.awt.Paint DEFAULT_BACKGROUND_PAINT
           The default background color.
static java.awt.Paint DEFAULT_BORDER_PAINT
           The default border color.
static java.awt.Stroke DEFAULT_BORDER_STROKE
           The default outline stroke.
static boolean DEFAULT_BORDER_VISIBLE
           A default flag that controls whether or not the plot border is drawn.
static boolean DEFAULT_DRAW_NO_DATA_MESSAGE
           A default flag that controls whether or not draw no data message if no data is available.
static IDrawingSupplier DEFAULT_DRAWINT_SUPPLIER
           The drawing supplier for this render.
static float DEFAULT_FOREGROUND_ALPHA
           The default foreground alpha transparency.
static RectangleInsets DEFAULT_INSETS
           The default insets.
static int DEFAULT_MINIMUM_HEIGHT_TO_DRAW
           The default minimum height at which the plot should be drawn.
static int DEFAULT_MINIMUM_WIDTH_TO_DRAW
           The default minimum width at which the plot should be drawn.
static java.lang.String DEFAULT_NO_DATA_MESSAGE
           The default message to display if no data is available.
static java.awt.Font DEFAULT_NO_DATA_MESSAGE_FONT
           The default font used to display the 'no data' message.
static java.awt.Paint DEFAULT_NO_DATA_MESSAGE_PAINT
           The paint used to draw the 'no data' message.
static RenderDrawOrder DEFAULT_RENDER_CALL_ORDER
           Default order for call renders.
 boolean drawNoDataMessage
           A flag that controls whether or not draw no data message if no data is available.
protected  PlotShapeCollection plotShapes
           Storage for plot information.
protected  RenderDrawOrder renderingOrder
           the order for call renders.
protected  java.util.List renderShapesList
           A list of render shape collection.
 
Constructor Summary
protected AbstractPlot()
           Creates a new plot.
 
Method Summary
 void addChangeListener(IPlotChangeListener listener)
           Registers an object for notification of changes to the plot.
 void axisChanged(AxisChangeEvent event)
           Receives notification of a change to one of the plot's axes.The plot reacts by passing on a axis change event to all registered listeners.
 java.lang.Object clone()
           Creates a clone of the plot.
 void datasetChanged(DatasetChangeEvent event)
           Receives notification of a change to the plot's dataset.
abstract  void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartShapeCollection chartShapes)
           Draws the plot within the specified area.Subclasses need to provide an implementation of this method, obviously.
protected  void drawBackground(java.awt.geom.Rectangle2D plotArea, ChartOrientation orientation, PlotShapeCollection shapeCollection)
           Fills the specified area with the background paint.
protected  void drawBackgroundImage(java.awt.geom.Rectangle2D plotArea, PlotShapeCollection shapeCollection)
           Draws the background image (if there is one) aligned within the specified area.
protected  void drawBorder(java.awt.geom.Rectangle2D plotArea, PlotShapeCollection shapeCollection)
           Draws the plot border.
abstract  boolean drawCrosshair(java.awt.geom.Point2D mouseClickPoint)
           Draws the crosshair.
protected  void drawNoDataMessage(java.awt.geom.Rectangle2D plotArea, PlotShapeCollection shapeCollection)
           Draws a message to state that there is no data to plot.
 boolean equals(java.lang.Object obj)
           Tests this plot for equality with another object.
protected  void firePlotChanged()
           Notifies all registered listeners that the plot has changed.
 float getBackgroundAlpha()
           Returns the alpha transparency of the plot area background.
 java.awt.Image getBackgroundImage()
           Returns the background image that is used to fill the plot's background area.
 Align getBackgroundImageAlignment()
           Returns the background image alignment.
 float getBackgroundImageAlpha()
           Returns the alpha transparency used to draw the background image.
 java.awt.Paint getBackgroundPaint()
           Returns the background color of the plot area.
 java.awt.Paint getBorderPaint()
           Returns the color used to draw the border of the plot area.
 java.awt.Stroke getBorderStroke()
           Returns the stroke used to outline the plot area.
 java.awt.geom.Point2D getCrosshairPoint(java.awt.geom.Point2D mouseClickPoint)
           Returns the crosshair point.
 java.awt.geom.Rectangle2D getDataArea()
           The data area.
 IDrawingSupplier getDrawingSupplier()
           Returns the drawing supplier for this render.
 float getForegroundAlpha()
           Returns the alpha-transparency for the plot foreground.
 RectangleInsets getInsets()
           Returns the insets for the plot area.
 java.lang.String getNoDataMessage()
           Returns the string that is displayed when the dataset is empty or null.
 java.awt.Font getNoDataMessageFont()
           Returns the font used to display the 'no data' message.
 java.awt.Paint getNoDataMessagePaint()
           Returns the paint used to display the 'no data' message.
abstract  PlotType getPlotType()
           Returns a short string describing the plot type.
 RenderDrawOrder getRenderDrawOrder()
           Returns the order for call renders.
abstract  java.util.Collection getRenders()
           Returns the collection of renders,and this collection is unmodifiable.
 java.util.Collection getRenderShapesList()
           Returns the list of render shape collection.
 java.util.Collection getSubPlots()
           Returns all sub plots.
 void handleClick(int x, int y, ChartShapeCollection shapeCollection)
          Handles a 'click' on the plot.
 int hashCode()
           Returns a hash code value for the object.
 boolean isBorderVisible()
           Returns the flag that controls whether or not the plot border is drawn.
 boolean isDomainZoomable()
           Returns true if the plot's domain axis is zoomable, and false otherwise.
 boolean isDrawNoDataMessage()
           Returns the flag that controls whether or not draw no data message if no data is available.
 boolean isValueZoomable()
           Returns true if the plot's value is zoomable, and false otherwise.
protected  void notifyListeners(PlotChangeEvent event)
           Notifies all registered listeners that the plot has been modified.
 void removeChangeListener(IPlotChangeListener listener)
           Unregisters an object for notification of changes to the plot.
 void renderChanged(RenderChangeEvent event)
           Receives notification of a render change event.
static RectangleEdge resolveDomainAxisLocation(AxisLocation location, ChartOrientation orientation)
           Resolves a domain axis location for a given chart orientation.
static RectangleEdge resolveValueAxisLocation(AxisLocation location, ChartOrientation orientation)
           Resolves a value axis location for a given chart orientation.
 void setBackgroundAlpha(float alpha)
           Sets the alpha transparency of the plot area background, and notifies registered listeners that the plot has been modified.
 void setBackgroundImage(java.awt.Image image)
           Sets the background image for the plot and sends a PlotChangeEvent to all registered listeners.
 void setBackgroundImageAlignment(Align alignment)
           Sets the alignment for the background image and sends a PlotChangeEvent to all registered listeners.
 void setBackgroundImageAlpha(float alpha)
           Sets the alpha transparency used when drawing the background image.
 void setBackgroundPaint(java.awt.Paint paint)
           Sets the background color of the plot area and sends a PlotChangeEvent to all registered listeners.
 void setBorderPaint(java.awt.Paint paint)
           Sets the paint used to draw the border of the plot area and sends a PlotChangeEvent to all registered listeners.
 void setBorderStroke(java.awt.Stroke stroke)
           Sets the stroke used to outline the plot area and sends a PlotChangeEvent to all registered listeners.
 void setBorderVisible(boolean visible)
           Sets the flag that controls whether or not the plot's border is drawn, and sends a PlotChangeEvent to all registered listeners.
 void setDrawingSupplier(IDrawingSupplier supplier)
           Sets the drawing supplier for this render,and sends a RenderChangeEvent to all registered listeners.
 void setDrawNoDataMessage(boolean flag)
           A flag that controls whether or not draw no data message if no data is available.
 void setForegroundAlpha(float alpha)
           Sets the alpha-transparency for the plot and sends a PlotChangeEvent to all registered listeners.
 void setInsets(RectangleInsets insets)
           Sets the insets for the plot and sends a PlotChangeEvent to all registered listeners.
protected  void setListObject(java.util.List list, int index, java.lang.Object obj)
           Replaces the element at the specified position in this list with the specified element.
 void setNoDataMessage(java.lang.String message)
           Sets the message that is displayed when the dataset is empty or null, and sends a PlotChangeEvent to all registered listeners.
 void setNoDataMessageFont(java.awt.Font font)
           Sets the font used to display the 'no data' message and sends a PlotChangeEvent to all registered listeners.
 void setNoDataMessagePaint(java.awt.Paint paint)
           Sets the paint used to display the 'no data' message and sends a PlotChangeEvent to all registered listeners.
 void setRenderDrawOrder(RenderDrawOrder order)
           Sets the renders call order and sends a PlotChangeEvent to all registered listeners.
 void zoomDomainAxes(java.awt.geom.Rectangle2D selectArea, java.awt.geom.Rectangle2D dataArea, java.awt.geom.Point2D source)
           Zoom domain axes.
 void zoomValueAxes(java.awt.geom.Rectangle2D selectArea, java.awt.geom.Rectangle2D dataArea, java.awt.geom.Point2D source)
           Zoom value axes.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ijchart.xychart.plot.IZoomable
getOrientation
 

Field Detail

DEFAULT_INSETS

public static final RectangleInsets DEFAULT_INSETS
The default insets.


DEFAULT_BORDER_STROKE

public static final java.awt.Stroke DEFAULT_BORDER_STROKE
The default outline stroke.


DEFAULT_BORDER_PAINT

public static final java.awt.Paint DEFAULT_BORDER_PAINT
The default border color.


DEFAULT_FOREGROUND_ALPHA

public static final float DEFAULT_FOREGROUND_ALPHA
The default foreground alpha transparency.

See Also:
Constant Field Values

DEFAULT_BACKGROUND_ALPHA

public static final float DEFAULT_BACKGROUND_ALPHA
The default background alpha transparency.

See Also:
Constant Field Values

DEFAULT_BACKGROUND_PAINT

public static final java.awt.Paint DEFAULT_BACKGROUND_PAINT
The default background color.


DEFAULT_MINIMUM_WIDTH_TO_DRAW

public static final int DEFAULT_MINIMUM_WIDTH_TO_DRAW
The default minimum width at which the plot should be drawn.

See Also:
Constant Field Values

DEFAULT_MINIMUM_HEIGHT_TO_DRAW

public static final int DEFAULT_MINIMUM_HEIGHT_TO_DRAW
The default minimum height at which the plot should be drawn.

See Also:
Constant Field Values

DEFAULT_NO_DATA_MESSAGE

public static final java.lang.String DEFAULT_NO_DATA_MESSAGE
The default message to display if no data is available.

See Also:
Constant Field Values

DEFAULT_NO_DATA_MESSAGE_FONT

public static final java.awt.Font DEFAULT_NO_DATA_MESSAGE_FONT
The default font used to display the 'no data' message.


DEFAULT_NO_DATA_MESSAGE_PAINT

public static final java.awt.Paint DEFAULT_NO_DATA_MESSAGE_PAINT
The paint used to draw the 'no data' message.


DEFAULT_BORDER_VISIBLE

public static final boolean DEFAULT_BORDER_VISIBLE
A default flag that controls whether or not the plot border is drawn.

See Also:
Constant Field Values

DEFAULT_BACKGROUND_IMAGE_ALIGNMENT

public static final Align DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
The default background image alignment.


DEFAULT_DRAW_NO_DATA_MESSAGE

public static final boolean DEFAULT_DRAW_NO_DATA_MESSAGE
A default flag that controls whether or not draw no data message if no data is available.

See Also:
Constant Field Values

DEFAULT_DRAWINT_SUPPLIER

public static final IDrawingSupplier DEFAULT_DRAWINT_SUPPLIER
The drawing supplier for this render.


DEFAULT_RENDER_CALL_ORDER

public static final RenderDrawOrder DEFAULT_RENDER_CALL_ORDER
Default order for call renders.


drawNoDataMessage

public boolean drawNoDataMessage
A flag that controls whether or not draw no data message if no data is available.


renderingOrder

protected RenderDrawOrder renderingOrder
the order for call renders.


renderShapesList

protected java.util.List renderShapesList
A list of render shape collection.


dataArea

protected java.awt.geom.Rectangle2D dataArea
The data area.


plotShapes

protected PlotShapeCollection plotShapes
Storage for plot information.

Constructor Detail

AbstractPlot

protected AbstractPlot()
Creates a new plot.

Method Detail

getNoDataMessage

public java.lang.String getNoDataMessage()
Returns the string that is displayed when the dataset is empty or null.

Returns:
The 'no data' message (null possible).

setNoDataMessage

public void setNoDataMessage(java.lang.String message)
Sets the message that is displayed when the dataset is empty or null, and sends a PlotChangeEvent to all registered listeners.

Parameters:
message - The message (null permitted).

getNoDataMessageFont

public java.awt.Font getNoDataMessageFont()
Returns the font used to display the 'no data' message.

Returns:
The font (never null).

setNoDataMessageFont

public void setNoDataMessageFont(java.awt.Font font)
Sets the font used to display the 'no data' message and sends a PlotChangeEvent to all registered listeners.

Parameters:
font - The font (null not permitted).

getNoDataMessagePaint

public java.awt.Paint getNoDataMessagePaint()
Returns the paint used to display the 'no data' message.

Returns:
The paint (never null).

setNoDataMessagePaint

public void setNoDataMessagePaint(java.awt.Paint paint)
Sets the paint used to display the 'no data' message and sends a PlotChangeEvent to all registered listeners.

Parameters:
paint - The paint (null not permitted).

getPlotType

public abstract PlotType getPlotType()
Returns a short string describing the plot type.

Returns:
The plot type.

getInsets

public RectangleInsets getInsets()
Returns the insets for the plot area.

Returns:
The insets (never null).

setInsets

public void setInsets(RectangleInsets insets)
Sets the insets for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters:
insets - The new insets (null not permitted).

getBackgroundPaint

public java.awt.Paint getBackgroundPaint()
Returns the background color of the plot area.

Returns:
The paint (possibly null).

setBackgroundPaint

public void setBackgroundPaint(java.awt.Paint paint)
Sets the background color of the plot area and sends a PlotChangeEvent to all registered listeners.

Parameters:
paint - The paint (null permitted).

getBackgroundAlpha

public float getBackgroundAlpha()
Returns the alpha transparency of the plot area background.

Returns:
The alpha transparency.

setBackgroundAlpha

public void setBackgroundAlpha(float alpha)
Sets the alpha transparency of the plot area background, and notifies registered listeners that the plot has been modified.

Parameters:
alpha - The new alpha value (in the range 0.0f to 1.0f).

getBackgroundImage

public java.awt.Image getBackgroundImage()
Returns the background image that is used to fill the plot's background area.

Returns:
The image (possibly null).

setBackgroundImage

public void setBackgroundImage(java.awt.Image image)
Sets the background image for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters:
image - The image (null permitted).

getBackgroundImageAlignment

public Align getBackgroundImageAlignment()
Returns the background image alignment. Alignment constants are defined in the Align class.

Returns:
The alignment (never null).

setBackgroundImageAlignment

public void setBackgroundImageAlignment(Align alignment)
Sets the alignment for the background image and sends a PlotChangeEvent to all registered listeners. Alignment options are defined by the Align class.

Parameters:
alignment - Align The alignment.

getBackgroundImageAlpha

public float getBackgroundImageAlpha()
Returns the alpha transparency used to draw the background image. This is a value in the range 0.0f to 1.0f, where 0.0f is fully transparent and 1.0f is fully opaque.

Returns:
The alpha transparency.

setBackgroundImageAlpha

public void setBackgroundImageAlpha(float alpha)
Sets the alpha transparency used when drawing the background image.

Parameters:
alpha - The alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent, and 1.0f is fully opaque).

isBorderVisible

public boolean isBorderVisible()
Returns the flag that controls whether or not the plot border is drawn.

Returns:
The border visibility flag.

setBorderVisible

public void setBorderVisible(boolean visible)
Sets the flag that controls whether or not the plot's border is drawn, and sends a PlotChangeEvent to all registered listeners.

Parameters:
visible - The new flag value.

getBorderStroke

public java.awt.Stroke getBorderStroke()
Returns the stroke used to outline the plot area.

Returns:
The stroke (never null).

setBorderStroke

public void setBorderStroke(java.awt.Stroke stroke)
Sets the stroke used to outline the plot area and sends a PlotChangeEvent to all registered listeners.

Parameters:
stroke - The stroke (null not permitted).

getBorderPaint

public java.awt.Paint getBorderPaint()
Returns the color used to draw the border of the plot area.

Returns:
The color (never null).

setBorderPaint

public void setBorderPaint(java.awt.Paint paint)
Sets the paint used to draw the border of the plot area and sends a PlotChangeEvent to all registered listeners.

Parameters:
paint - The paint (null not permitted).

getForegroundAlpha

public float getForegroundAlpha()
Returns the alpha-transparency for the plot foreground.

Returns:
The alpha-transparency.

setForegroundAlpha

public void setForegroundAlpha(float alpha)
Sets the alpha-transparency for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters:
alpha - The new alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent, and 1.0f is fully opaque).

isDrawNoDataMessage

public boolean isDrawNoDataMessage()
Returns the flag that controls whether or not draw no data message if no data is available.

Returns:
boolean Returns true if draw no data message,otherwise return false.

setDrawNoDataMessage

public void setDrawNoDataMessage(boolean flag)
A flag that controls whether or not draw no data message if no data is available.

Parameters:
flag - boolean Returns true if draw no data message,otherwise return false.

getDrawingSupplier

public IDrawingSupplier getDrawingSupplier()
Returns the drawing supplier for this render.

Returns:
IDrawingSupplier The drawing supplier for this render (never null).

setDrawingSupplier

public void setDrawingSupplier(IDrawingSupplier supplier)
Sets the drawing supplier for this render,and sends a RenderChangeEvent to all registered listeners.

Parameters:
supplier - IDrawingSupplier The drawing supplier for this render (null not permitted).

draw

public abstract void draw(java.awt.Graphics2D g2,
                          java.awt.geom.Rectangle2D plotArea,
                          ChartShapeCollection chartShapes)
Draws the plot within the specified area.Subclasses need to provide an implementation of this method, obviously.

Parameters:
g2 - Graphics2D The graphics device (null not permitted).
plotArea - Rectangle2D The plot draw area (null not permitted).
chartShapes - ChartShapeCollection Collects information about the chart (null not permitted).

drawCrosshair

public abstract boolean drawCrosshair(java.awt.geom.Point2D mouseClickPoint)
Draws the crosshair.

Parameters:
mouseClickPoint - Point2D The mouse click point (null permitted).
Returns:
boolean Returns whether or not crosshair is changed.

getCrosshairPoint

public java.awt.geom.Point2D getCrosshairPoint(java.awt.geom.Point2D mouseClickPoint)
Returns the crosshair point.

Parameters:
mouseClickPoint - Point2D The mouse click point (null permitted).
Returns:
Point2D The point (maybe null).

drawBackground

protected void drawBackground(java.awt.geom.Rectangle2D plotArea,
                              ChartOrientation orientation,
                              PlotShapeCollection shapeCollection)
Fills the specified area with the background paint. If the background paint is an instance of GradientPaint, the gradient will run in the direction suggested by the plot's orientation.

Parameters:
plotArea - The background draw area (null not permitted).
orientation - ChartOrientation The chart draw orientation.
shapeCollection - RenderShapeCollection Collects information about the plot (null not permitted).

drawBackgroundImage

protected void drawBackgroundImage(java.awt.geom.Rectangle2D plotArea,
                                   PlotShapeCollection shapeCollection)
Draws the background image (if there is one) aligned within the specified area.

Parameters:
plotArea - The background draw area (null not permitted).
shapeCollection - RenderShapeCollection Collects information about the plot (null not permitted).

drawBorder

protected void drawBorder(java.awt.geom.Rectangle2D plotArea,
                          PlotShapeCollection shapeCollection)
Draws the plot border.

Parameters:
plotArea - The background draw area (null not permitted).
shapeCollection - RenderShapeCollection Collects information about the plot (null not permitted).

drawNoDataMessage

protected void drawNoDataMessage(java.awt.geom.Rectangle2D plotArea,
                                 PlotShapeCollection shapeCollection)
Draws a message to state that there is no data to plot.

Parameters:
plotArea - The background draw area (null not permitted).
shapeCollection - RenderShapeCollection Collects information about the plot (null not permitted).

getRenderDrawOrder

public RenderDrawOrder getRenderDrawOrder()
Returns the order for call renders.

Returns:
RenderDrawOrder The order for call renders (never null).

setRenderDrawOrder

public void setRenderDrawOrder(RenderDrawOrder order)
Sets the renders call order and sends a PlotChangeEvent to all registered listeners.

Parameters:
order - RenderDrawOrder The rendering order (null not permitted).

getRenderShapesList

public java.util.Collection getRenderShapesList()
Returns the list of render shape collection.

Returns:
Collection The collection and unmodifiable.

getRenders

public abstract java.util.Collection getRenders()
Returns the collection of renders,and this collection is unmodifiable.

Returns:
Collection The collection of renders.

getDataArea

public java.awt.geom.Rectangle2D getDataArea()
The data area.

Returns:
dataArea Rectangle2D The area.

isDomainZoomable

public boolean isDomainZoomable()
Returns true if the plot's domain axis is zoomable, and false otherwise.

Specified by:
isDomainZoomable in interface IZoomable
Returns:
boolean A boolean.

isValueZoomable

public boolean isValueZoomable()
Returns true if the plot's value is zoomable, and false otherwise.

Specified by:
isValueZoomable in interface IZoomable
Returns:
boolean A boolean.

getSubPlots

public java.util.Collection getSubPlots()
Returns all sub plots.

Returns:
Collection The collection of sub plots (unmodifiable).

zoomDomainAxes

public void zoomDomainAxes(java.awt.geom.Rectangle2D selectArea,
                           java.awt.geom.Rectangle2D dataArea,
                           java.awt.geom.Point2D source)
Zoom domain axes.

Specified by:
zoomDomainAxes in interface IZoomable
Parameters:
selectArea - Rectangle2D The selected area,null to restore chart.
dataArea - Rectangle2D The data area,null to restore chart.
source - Point2D The source mouse point (null not permitted).

zoomValueAxes

public void zoomValueAxes(java.awt.geom.Rectangle2D selectArea,
                          java.awt.geom.Rectangle2D dataArea,
                          java.awt.geom.Point2D source)
Zoom value axes.

Specified by:
zoomValueAxes in interface IZoomable
Parameters:
selectArea - Rectangle2D The selected area,null to restore chart.
dataArea - Rectangle2D The data area,null to restore chart.
source - Point2D The source mouse point (null not permitted).

handleClick

public void handleClick(int x,
                        int y,
                        ChartShapeCollection shapeCollection)
Handles a 'click' on the plot. Since the plot does not maintain any information about where it has been drawn, the plot rendering info is supplied as an argument.

Parameters:
x - the x coordinate (in Java2D space).
y - the y coordinate (in Java2D space).
shapeCollection - an object containing information about the dimensions of the plot.

axisChanged

public void axisChanged(AxisChangeEvent event)
Receives notification of a change to one of the plot's axes.The plot reacts by passing on a axis change event to all registered listeners.

Specified by:
axisChanged in interface IAxisChangeListener
Parameters:
event - Information about the event (not used here).

datasetChanged

public void datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset. The plot reacts by passing on a plot change event to all registered listeners.

Specified by:
datasetChanged in interface IDatasetChangeListener
Parameters:
event - Information about the event (not used here).

addChangeListener

public void addChangeListener(IPlotChangeListener listener)
Registers an object for notification of changes to the plot.

Parameters:
listener - The object to be registered (null not permitted).

removeChangeListener

public void removeChangeListener(IPlotChangeListener listener)
Unregisters an object for notification of changes to the plot.

Parameters:
listener - The object to be unregistered (null not permitted).

firePlotChanged

protected void firePlotChanged()
Notifies all registered listeners that the plot has changed.


renderChanged

public void renderChanged(RenderChangeEvent event)
Receives notification of a render change event.

Specified by:
renderChanged in interface IRenderChangeListener
Parameters:
event - RenderChangeEvent The render change event.

notifyListeners

protected void notifyListeners(PlotChangeEvent event)
Notifies all registered listeners that the plot has been modified.

Parameters:
event - Information about the change event (null not permitted).

resolveDomainAxisLocation

public static RectangleEdge resolveDomainAxisLocation(AxisLocation location,
                                                      ChartOrientation orientation)
Resolves a domain axis location for a given chart orientation.

Parameters:
location - The location (null not permitted).
orientation - The chart orientation (null not permitted).
Returns:
The edge (never null).

resolveValueAxisLocation

public static RectangleEdge resolveValueAxisLocation(AxisLocation location,
                                                     ChartOrientation orientation)
Resolves a value axis location for a given chart orientation.

Parameters:
location - The location (null not permitted).
orientation - The chart orientation (null not permitted).
Returns:
The edge (never null).

equals

public boolean equals(java.lang.Object obj)
Tests this plot for equality with another object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
true or false.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a clone of the plot.

Overrides:
clone in class java.lang.Object
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the plot does not support cloning.

setListObject

protected void setListObject(java.util.List list,
                             int index,
                             java.lang.Object obj)
Replaces the element at the specified position in this list with the specified element.

Parameters:
list - List The list (null not permitted).
index - int The dataset index (zero-based).
obj - Object The object (null permitted).