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 |
|
public static final Stroke DEFAULT_GRIDLINE_STROKE
The default grid line stroke.
protected static ResourceBundle localizationResources
The resourceBundle for the localization.
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.domainAxis
- the domain (x) axis.rangeAxis
- the range (y) axis.
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, if there is one.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
).
public Range getDataRange(ValueAxis axis)
Returns the range of data values to be plotted along the axis.
- Specified by:
- getDataRange in interface ValueAxisPlot
- Parameters:
axis
- the axis.
- Returns:
- The range.
public ValueAxis getDomainAxis()
Returns the domain axis for the plot. If the domain axis for this plot is null, then the method will return the parent plot's domain axis (if there is a parent plot).
- Returns:
- The domain axis.
public Paint getDomainGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the domain axis.
- Returns:
- The paint.
public Stroke getDomainGridlineStroke()
Returns the stroke for the grid-lines (if any) plotted against the domain axis.
- Returns:
- The stroke.
public PlotOrientation getOrientation()
Returns the orientation of the plot.
- Specified by:
- getOrientation in interface Zoomable
- Returns:
- The orientation (always
PlotOrientation.VERTICAL
).
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. If the range axis for this plot is null, then the method will return the parent plot's range axis (if there is a parent plot).
- Returns:
- The range axis.
public Paint getRangeGridlinePaint()
Returns the paint for the grid lines (if any) plotted against the range axis.
- Returns:
- The paint.
public Stroke getRangeGridlineStroke()
Returns the stroke for the grid lines (if any) plotted against the range axis.
- Returns:
- The 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
.
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).
public void setDomainGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the domain axis. If you set this tonull
, no grid lines will be drawn.
- Parameters:
paint
- the paint (null
permitted).
public void setDomainGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the domain axis. If you set this tonull
, no grid lines will be drawn.
- Parameters:
stroke
- the stroke (null
permitted).
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.
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).
public void setRangeGridlinePaint(Paint paint)
Sets the paint for the grid lines plotted against the range axis. If you set this tonull
, no grid lines will be drawn.
- Parameters:
paint
- the paint (null
permitted).
public void setRangeGridlineStroke(Stroke stroke)
Sets the stroke for the grid lines plotted against the range axis. If you set this tonull
, no grid lines will be drawn.
- Parameters:
stroke
- the stroke (null
permitted).
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.
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.