Package org.jfree.chart.plot
Class FastScatterPlot
- java.lang.Object
-
- org.jfree.chart.plot.Plot
-
- org.jfree.chart.plot.FastScatterPlot
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,AnnotationChangeListener
,AxisChangeListener
,MarkerChangeListener
,LegendItemSource
,Pannable
,ValueAxisPlot
,Zoomable
,PublicCloneable
,DatasetChangeListener
public class FastScatterPlot extends Plot implements ValueAxisPlot, Pannable, Zoomable, java.lang.Cloneable, java.io.Serializable
A fast scatter plot.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private float[][]
data
The data.static java.awt.Paint
DEFAULT_GRIDLINE_PAINT
The default grid line paint.static java.awt.Stroke
DEFAULT_GRIDLINE_STROKE
The default grid line stroke.private ValueAxis
domainAxis
The domain axis (used for the x-values).private java.awt.Paint
domainGridlinePaint
The paint used to draw the domain grid-lines.private java.awt.Stroke
domainGridlineStroke
The stroke used to draw the domain grid-lines.private boolean
domainGridlinesVisible
A flag that controls whether the domain grid-lines are visible.private boolean
domainPannable
A flag that controls whether or not panning is enabled for the domain axis.protected static java.util.ResourceBundle
localizationResources
The resourceBundle for the localization.private java.awt.Paint
paint
The paint used to plot data points.private ValueAxis
rangeAxis
The range axis (used for the y-values).private java.awt.Paint
rangeGridlinePaint
The paint used to draw the range grid-lines.private java.awt.Stroke
rangeGridlineStroke
The stroke used to draw the range grid-lines.private boolean
rangeGridlinesVisible
A flag that controls whether the range grid-lines are visible.private boolean
rangePannable
A flag that controls whether or not panning is enabled for the range axis.private static long
serialVersionUID
For serialization.private Range
xDataRange
The x data range.private Range
yDataRange
The y data range.-
Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
-
-
Constructor Summary
Constructors Constructor Description FastScatterPlot()
Creates a new instance ofFastScatterPlot
with default axes.FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis)
Creates a new fast scatter plot.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Range
calculateXDataRange(float[][] data)
Calculates the X data range.private Range
calculateYDataRange(float[][] data)
Calculates the Y data range.java.lang.Object
clone()
Returns a clone of the plot.void
draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).protected void
drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
Draws the gridlines for the plot, if they are visible.protected void
drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
Draws the gridlines for the plot, if they are visible.boolean
equals(java.lang.Object obj)
Tests an arbitrary object for equality with this plot.float[][]
getData()
Returns the data array used by the plot.Range
getDataRange(ValueAxis axis)
Returns the range of data values to be plotted along the axis, ornull
if the specified axis isn't the domain axis or the range axis for the plot.ValueAxis
getDomainAxis()
Returns the domain axis for the plot.java.awt.Paint
getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain axis.java.awt.Stroke
getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain axis.PlotOrientation
getOrientation()
Returns the orientation of the plot.java.awt.Paint
getPaint()
Returns the paint used to plot data points.java.lang.String
getPlotType()
Returns a short string describing the plot type.ValueAxis
getRangeAxis()
Returns the range axis for the plot.java.awt.Paint
getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range axis.java.awt.Stroke
getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range axis.boolean
isDomainGridlinesVisible()
Returnstrue
if the domain gridlines are visible, andfalse
otherwise.boolean
isDomainPannable()
Returnstrue
if panning is enabled for the domain axes, andfalse
otherwise.boolean
isDomainZoomable()
Returnstrue
.boolean
isRangeGridlinesVisible()
Returnstrue
if the range axis grid is visible, andfalse
otherwise.boolean
isRangePannable()
Returnstrue
if panning is enabled for the range axes, andfalse
otherwise.boolean
isRangeZoomable()
Returnstrue
.void
panDomainAxes(double percent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Pans the domain axes by the specified percentage.void
panRangeAxes(double percent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Pans the range axes by the specified percentage.private void
readObject(java.io.ObjectInputStream stream)
Provides serialization support.void
render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region.void
setData(float[][] data)
Sets the data array used by the plot and sends aPlotChangeEvent
to all registered listeners.void
setDomainAxis(ValueAxis axis)
Sets the domain axis and sends aPlotChangeEvent
to all registered listeners.void
setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the domain axis and sends aPlotChangeEvent
to all registered listeners.void
setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis and sends aPlotChangeEvent
to all registered listeners.void
setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are visible.void
setDomainPannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the domain axes.void
setPaint(java.awt.Paint paint)
Sets the color for the data points and sends aPlotChangeEvent
to all registered listeners.void
setRangeAxis(ValueAxis axis)
Sets the range axis and sends aPlotChangeEvent
to all registered listeners.void
setRangeGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the range axis and sends aPlotChangeEvent
to all registered listeners.void
setRangeGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis and sends aPlotChangeEvent
to all registered listeners.void
setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines are visible.void
setRangePannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the range axes.private void
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support.void
zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Zooms in on the domain axes.void
zoomDomainAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source)
Multiplies the range on the domain axis by the specified factor.void
zoomDomainAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
Multiplies the range on the domain axis by the specified factor.void
zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Zooms in on the range axes.void
zoomRangeAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source)
Multiplies the range on the range axis/axes by the specified factor.void
zoomRangeAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
Multiplies the range on the range axis by the specified factor.-
Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, annotationChanged, axisChanged, canEqual, createAndAddEntity, datasetChanged, drawBackground, drawBackgroundImage, drawNoDataMessage, drawOutline, fetchElementHintingFlag, fillBackground, fillBackground, fireChangeEvent, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getChart, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getLegendItems, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, handleClick, hashCode, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setChart, setDatasetGroup, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent, zoom
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
DEFAULT_GRIDLINE_STROKE
public static final java.awt.Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
-
DEFAULT_GRIDLINE_PAINT
public static final java.awt.Paint DEFAULT_GRIDLINE_PAINT
The default grid line paint.
-
data
private float[][] data
The data.
-
xDataRange
private Range xDataRange
The x data range.
-
yDataRange
private Range yDataRange
The y data range.
-
domainAxis
private ValueAxis domainAxis
The domain axis (used for the x-values).
-
rangeAxis
private ValueAxis rangeAxis
The range axis (used for the y-values).
-
paint
private transient java.awt.Paint paint
The paint used to plot data points.
-
domainGridlinesVisible
private boolean domainGridlinesVisible
A flag that controls whether the domain grid-lines are visible.
-
domainGridlineStroke
private transient java.awt.Stroke domainGridlineStroke
The stroke used to draw the domain grid-lines.
-
domainGridlinePaint
private transient java.awt.Paint domainGridlinePaint
The paint used to draw the domain grid-lines.
-
rangeGridlinesVisible
private boolean rangeGridlinesVisible
A flag that controls whether the range grid-lines are visible.
-
rangeGridlineStroke
private transient java.awt.Stroke rangeGridlineStroke
The stroke used to draw the range grid-lines.
-
rangeGridlinePaint
private transient java.awt.Paint rangeGridlinePaint
The paint used to draw the range grid-lines.
-
domainPannable
private boolean domainPannable
A flag that controls whether or not panning is enabled for the domain axis.
-
rangePannable
private boolean rangePannable
A flag that controls whether or not panning is enabled for the range axis.
-
localizationResources
protected static java.util.ResourceBundle localizationResources
The resourceBundle for the localization.
-
-
Constructor Detail
-
FastScatterPlot
public FastScatterPlot()
Creates a new instance ofFastScatterPlot
with default axes.
-
FastScatterPlot
public FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis)
Creates a new fast scatter plot.The data is an array of x, y values: data[0][i] = x, data[1][i] = y.
- Parameters:
data
- the data (null
permitted).domainAxis
- the domain (x) axis (null
not permitted).rangeAxis
- the range (y) axis (null
not permitted).
-
-
Method Detail
-
getPlotType
public java.lang.String getPlotType()
Returns a short string describing the plot type.- Specified by:
getPlotType
in classPlot
- Returns:
- A short string describing the plot type.
-
getData
public float[][] getData()
Returns the data array used by the plot.- Returns:
- The data array (possibly
null
). - See Also:
setData(float[][])
-
setData
public void setData(float[][] data)
Sets the data array used by the plot and sends aPlotChangeEvent
to all registered listeners.- Parameters:
data
- the data array (null
permitted).- See Also:
getData()
-
getOrientation
public PlotOrientation getOrientation()
Returns the orientation of the plot.- Specified by:
getOrientation
in interfacePannable
- Specified by:
getOrientation
in interfaceZoomable
- Returns:
- The orientation (always
PlotOrientation.VERTICAL
).
-
getDomainAxis
public ValueAxis getDomainAxis()
Returns the domain axis for the plot.- Returns:
- The domain axis (never
null
). - See Also:
setDomainAxis(ValueAxis)
-
setDomainAxis
public void setDomainAxis(ValueAxis axis)
Sets the domain axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
axis
- the axis (null
not permitted).- See Also:
getDomainAxis()
-
getRangeAxis
public ValueAxis getRangeAxis()
Returns the range axis for the plot.- Returns:
- The range axis (never
null
). - See Also:
setRangeAxis(ValueAxis)
-
setRangeAxis
public void setRangeAxis(ValueAxis axis)
Sets the range axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
axis
- the axis (null
not permitted).- See Also:
getRangeAxis()
-
getPaint
public java.awt.Paint getPaint()
Returns the paint used to plot data points. The default isColor.RED
.- Returns:
- The paint.
- See Also:
setPaint(Paint)
-
setPaint
public void setPaint(java.awt.Paint paint)
Sets the color for the data points and sends aPlotChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getPaint()
-
isDomainGridlinesVisible
public boolean isDomainGridlinesVisible()
Returnstrue
if the domain gridlines are visible, andfalse
otherwise.- Returns:
true
orfalse
.- See Also:
setDomainGridlinesVisible(boolean)
,setDomainGridlinePaint(Paint)
-
setDomainGridlinesVisible
public void setDomainGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the domain grid-lines are visible. If the flag value is changed, aPlotChangeEvent
is sent to all registered listeners.- Parameters:
visible
- the new value of the flag.- See Also:
getDomainGridlinePaint()
-
getDomainGridlineStroke
public java.awt.Stroke getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain axis.- Returns:
- The stroke (never
null
). - See Also:
setDomainGridlineStroke(Stroke)
-
setDomainGridlineStroke
public void setDomainGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
not permitted).- See Also:
getDomainGridlineStroke()
-
getDomainGridlinePaint
public java.awt.Paint getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain axis.- Returns:
- The paint (never
null
). - See Also:
setDomainGridlinePaint(Paint)
-
setDomainGridlinePaint
public void setDomainGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the domain axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getDomainGridlinePaint()
-
isRangeGridlinesVisible
public boolean isRangeGridlinesVisible()
Returnstrue
if the range axis grid is visible, andfalse
otherwise.- Returns:
true
orfalse
.- See Also:
setRangeGridlinesVisible(boolean)
-
setRangeGridlinesVisible
public void setRangeGridlinesVisible(boolean visible)
Sets the flag that controls whether or not the range axis grid lines are visible. If the flag value is changed, aPlotChangeEvent
is sent to all registered listeners.- Parameters:
visible
- the new value of the flag.- See Also:
isRangeGridlinesVisible()
-
getRangeGridlineStroke
public java.awt.Stroke getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range axis.- Returns:
- The stroke (never
null
). - See Also:
setRangeGridlineStroke(Stroke)
-
setRangeGridlineStroke
public void setRangeGridlineStroke(java.awt.Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
stroke
- the stroke (null
permitted).- See Also:
getRangeGridlineStroke()
-
getRangeGridlinePaint
public java.awt.Paint getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range axis.- Returns:
- The paint (never
null
). - See Also:
setRangeGridlinePaint(Paint)
-
setRangeGridlinePaint
public void setRangeGridlinePaint(java.awt.Paint paint)
Sets the paint for the grid lines plotted against the range axis and sends aPlotChangeEvent
to all registered listeners.- Parameters:
paint
- the paint (null
not permitted).- See Also:
getRangeGridlinePaint()
-
draw
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.awt.geom.Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).- Specified by:
draw
in classPlot
- Parameters:
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 state from the parent plot (ignored).info
- collects chart drawing information (null
permitted).
-
render
public void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region. Theinfo
andcrosshairState
arguments may benull
.- Parameters:
g2
- the graphics device.dataArea
- the region in which the data is to be drawn.info
- an optional object for collection dimension information.crosshairState
- collects crosshair information (null
permitted).
-
drawDomainGridlines
protected void drawDomainGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
Draws the gridlines for the plot, if they are visible.- Parameters:
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.
-
drawRangeGridlines
protected void drawRangeGridlines(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, java.util.List ticks)
Draws the gridlines for the plot, if they are visible.- Parameters:
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.
-
getDataRange
public Range getDataRange(ValueAxis axis)
Returns the range of data values to be plotted along the axis, ornull
if the specified axis isn't the domain axis or the range axis for the plot.- Specified by:
getDataRange
in interfaceValueAxisPlot
- Parameters:
axis
- the axis (null
permitted).- Returns:
- The range (possibly
null
).
-
calculateXDataRange
private Range calculateXDataRange(float[][] data)
Calculates the X data range.- Parameters:
data
- the data (null
permitted).- Returns:
- The range.
-
calculateYDataRange
private Range calculateYDataRange(float[][] data)
Calculates the Y data range.- Parameters:
data
- the data (null
permitted).- Returns:
- The range.
-
zoomDomainAxes
public void zoomDomainAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source)
Multiplies the range on the domain axis by the specified factor.- Specified by:
zoomDomainAxes
in interfaceZoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.- See Also:
Zoomable.zoomRangeAxes(double, PlotRenderingInfo, Point2D)
-
zoomDomainAxes
public void zoomDomainAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
Multiplies the range on the domain axis by the specified factor.- Specified by:
zoomDomainAxes
in interfaceZoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point (in Java2D space).useAnchor
- use source point as zoom anchor?- See Also:
zoomRangeAxes(double, PlotRenderingInfo, Point2D, boolean)
-
zoomDomainAxes
public void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Zooms in on the domain axes.- Specified by:
zoomDomainAxes
in interfaceZoomable
- Parameters:
lowerPercent
- the new lower bound as a percentage of the current range.upperPercent
- the new upper bound as a percentage of the current range.info
- the plot rendering info.source
- the source point.- See Also:
Zoomable.zoomRangeAxes(double, double, PlotRenderingInfo, Point2D)
-
zoomRangeAxes
public void zoomRangeAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source)
Multiplies the range on the range axis/axes by the specified factor.- Specified by:
zoomRangeAxes
in interfaceZoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.- See Also:
Zoomable.zoomDomainAxes(double, PlotRenderingInfo, Point2D)
-
zoomRangeAxes
public void zoomRangeAxes(double factor, PlotRenderingInfo info, java.awt.geom.Point2D source, boolean useAnchor)
Multiplies the range on the range axis by the specified factor.- Specified by:
zoomRangeAxes
in interfaceZoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point (in Java2D space).useAnchor
- use source point as zoom anchor?- See Also:
zoomDomainAxes(double, PlotRenderingInfo, Point2D, boolean)
-
zoomRangeAxes
public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Zooms in on the range axes.- Specified by:
zoomRangeAxes
in interfaceZoomable
- Parameters:
lowerPercent
- the new lower bound as a percentage of the current range.upperPercent
- the new upper bound as a percentage of the current range.info
- the plot rendering info.source
- the source point.- See Also:
Zoomable.zoomDomainAxes(double, double, PlotRenderingInfo, Point2D)
-
isDomainZoomable
public boolean isDomainZoomable()
Returnstrue
.- Specified by:
isDomainZoomable
in interfaceZoomable
- Returns:
- A boolean.
- See Also:
Zoomable.isRangeZoomable()
-
isRangeZoomable
public boolean isRangeZoomable()
Returnstrue
.- Specified by:
isRangeZoomable
in interfaceZoomable
- Returns:
- A boolean.
- See Also:
Zoomable.isDomainZoomable()
-
isDomainPannable
public boolean isDomainPannable()
Returnstrue
if panning is enabled for the domain axes, andfalse
otherwise.- Specified by:
isDomainPannable
in interfacePannable
- Returns:
- A boolean.
-
setDomainPannable
public void setDomainPannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the domain axes.- Parameters:
pannable
- the new flag value.
-
isRangePannable
public boolean isRangePannable()
Returnstrue
if panning is enabled for the range axes, andfalse
otherwise.- Specified by:
isRangePannable
in interfacePannable
- Returns:
- A boolean.
-
setRangePannable
public void setRangePannable(boolean pannable)
Sets the flag that enables or disables panning of the plot along the range axes.- Parameters:
pannable
- the new flag value.
-
panDomainAxes
public void panDomainAxes(double percent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Pans the domain axes by the specified percentage.- Specified by:
panDomainAxes
in interfacePannable
- Parameters:
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.
-
panRangeAxes
public void panRangeAxes(double percent, PlotRenderingInfo info, java.awt.geom.Point2D source)
Pans the range axes by the specified percentage.- Specified by:
panRangeAxes
in interfacePannable
- Parameters:
percent
- the distance to pan (as a percentage of the axis length).info
- the plot infosource
- the source point where the pan action started.
-
equals
public boolean equals(java.lang.Object obj)
Tests an arbitrary object for equality with this plot. Note thatFastScatterPlot
carries its data around with it (rather than referencing a dataset), and the data is included in the equality test.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of the plot.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classPlot
- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException
- if some component of the plot does not support cloning.
-
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
Provides serialization support.- Parameters:
stream
- the output stream.- Throws:
java.io.IOException
- if there is an I/O error.
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Provides serialization support.- Parameters:
stream
- the input stream.- Throws:
java.io.IOException
- if there is an I/O error.java.lang.ClassNotFoundException
- if there is a classpath problem.
-
-