Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.FastScatterPlot
Field Summary | |
static Paint |
|
static Stroke |
|
protected static ResourceBundle |
|
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 | |
| |
|
Method Summary | |
Object |
|
void |
|
protected void |
|
protected void |
|
boolean |
|
float[][] |
|
Range |
|
ValueAxis |
|
Paint |
|
Stroke |
|
PlotOrientation |
|
Paint |
|
String |
|
ValueAxis |
|
Paint |
|
Stroke |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public static final Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
protected static ResourceBundle localizationResources
The resourceBundle for the localization.
public FastScatterPlot()
Creates a new instance ofFastScatterPlot
with default axes.
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).
public Object clone() throws CloneNotSupportedException
Returns a clone of the plot.
- Returns:
- A clone.
public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the fast scatter plot on a Java 2D graphics device (such as the screen or a printer).
- 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).
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
- Parameters:
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks)
Draws the gridlines for the plot, if they are visible.
- Parameters:
g2
- the graphics device.dataArea
- the data area.ticks
- the ticks.
public boolean equals(Object obj)
Tests an object for equality with this instance.
- Parameters:
obj
- the object (null
permitted).
- Returns:
- A boolean.
public float[][] getData()
Returns the data array used by the plot.
- Returns:
- The data array (possibly
null
).
- See Also:
setData(float[][])
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 interface ValueAxisPlot
- Parameters:
axis
- the axis (null
permitted).
- Returns:
- The range (possibly
null
).
public ValueAxis getDomainAxis()
Returns the domain axis for the plot.
- Returns:
- The domain axis (never
null
).
- See Also:
setDomainAxis(ValueAxis)
public 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)
public 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)
public PlotOrientation getOrientation()
Returns the orientation of the plot.
- Specified by:
- getOrientation in interface Zoomable
- Returns:
- The orientation (always
PlotOrientation.VERTICAL
).
public Paint getPaint()
Returns the paint used to plot data points. The default isColor.red
.
- Returns:
- The paint.
- See Also:
setPaint(Paint)
public String getPlotType()
Returns a short string describing the plot type.
- Overrides:
- getPlotType in interface Plot
- Returns:
- A short string describing the plot type.
public ValueAxis getRangeAxis()
Returns the range axis for the plot.
- Returns:
- The range axis (never
null
).
- See Also:
setRangeAxis(ValueAxis)
public 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)
public 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)
public boolean isDomainGridlinesVisible()
Returnstrue
if the domain gridlines are visible, andfalse
otherwise.
- Returns:
true
orfalse
.
public boolean isDomainZoomable()
Returnstrue
.
- Specified by:
- isDomainZoomable in interface Zoomable
- Returns:
- A boolean.
public boolean isRangeGridlinesVisible()
Returnstrue
if the range axis grid is visible, andfalse
otherwise.
- Returns:
true
orfalse
.
- See Also:
setRangeGridlinesVisible(boolean)
public boolean isRangeZoomable()
Returnstrue
.
- Specified by:
- isRangeZoomable in interface Zoomable
- Returns:
- A boolean.
public void render(Graphics2D g2, 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).
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()
public void setDomainAxis(ValueAxis axis)
Sets the domain axis and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
axis
- the axis (null
not permitted).
- Since:
- 1.0.3
- See Also:
getDomainAxis()
public void setDomainGridlinePaint(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()
public void setDomainGridlineStroke(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()
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()
public void setPaint(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()
public void setRangeAxis(ValueAxis axis)
Sets the range axis and sends aPlotChangeEvent
to all registered listeners.
- Parameters:
axis
- the axis (null
not permitted).
- Since:
- 1.0.3
- See Also:
getRangeAxis()
public void setRangeGridlinePaint(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()
public void setRangeGridlineStroke(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()
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()
public void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the domain axes.
- Specified by:
- zoomDomainAxes in interface Zoomable
- 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.
public void zoomDomainAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.
- Specified by:
- zoomDomainAxes in interface Zoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.
public void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo info, Point2D source)
Zooms in on the range axes.
- Specified by:
- zoomRangeAxes in interface Zoomable
- 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.
public void zoomRangeAxes(double factor, PlotRenderingInfo info, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
- Specified by:
- zoomRangeAxes in interface Zoomable
- Parameters:
factor
- the zoom factor.info
- the plot rendering info.source
- the source point.