|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.approximatrix.charting.render.AbstractChartRenderer
com.approximatrix.charting.render.MultiScatterChartRenderer
public class MultiScatterChartRenderer
This renderer creates a scatter chart based on data contained in a MultiScatterDataModel. The renderer will draw line and/or markers, depending on the settings contained within each data set on the MultiScatterDataModel. This renderer also provides buffering of transformed coordinates, which in turn causes the refresh speed to be increased significantly.
| Field Summary | |
|---|---|
protected java.awt.Rectangle |
bounds
|
private boolean |
buffer_transform
Flag indicating whether coordinate transform buffering should be used |
protected CoordSystem |
coord
|
private java.awt.geom.AffineTransform |
last
Buffered version of the coordinate transform used for painting |
protected MultiScatterDataModel |
model
|
protected RowColorModel |
rcm
|
protected double |
shapeSize
|
private java.util.ArrayList |
transformed
ArrayList of transformed Point2D arrays for buffering the coordinate transform |
| Constructor Summary | |
|---|---|
MultiScatterChartRenderer(CoordSystem cs,
MultiScatterDataModel model)
Creates new LineChartRenderer |
|
| Method Summary | |
|---|---|
private void |
drawline(java.awt.geom.AffineTransform yaxis1,
int set,
java.awt.Graphics2D g)
Performs the line drawing for a given data set if called |
private void |
drawmarkers(java.awt.geom.AffineTransform yaxis1,
int set,
java.awt.Graphics2D g)
Performs the drawing point markers for a given data set if called |
void |
fireDataUpdate()
Clears all buffered transformation and drawing information |
java.awt.Rectangle |
getBounds()
Returns the graphical bounds for this renderer |
ChartDataModel |
getChartDataModel()
Returns the ChartDataModel whose DataSets are rendered. |
CoordSystem |
getCoordSystem()
Returns the current CoordSystem. |
java.awt.Dimension |
getPreferredSize()
Returns the renderer's prefered size |
RowColorModel |
getRowColorModel()
Returns the RowColorModel currently in use. |
java.awt.geom.AffineTransform |
getTransform(int axis)
Returns the currently defined AffineTransform for any y-axis. |
void |
render(java.awt.Graphics2D g)
Renders the plot to the specifed graphics object. |
void |
renderChart(java.awt.Graphics2D g)
Finally renders the Object in the Graphics object. |
void |
setAllowBuffer(boolean value)
Sets whether the renderer can buffer data internally for faster drawing |
void |
setBounds(java.awt.Rectangle bounds)
Sets the graphical bounds for this renderer |
void |
setChartDataModel(ChartDataModel model)
Sets the ChartDataModel whose DataSets are rendered. |
void |
setCoordSystem(CoordSystem cs)
Sets the CoordSystem which contains the AffineTransforms to translate into pixel space. |
void |
setRowColorModel(RowColorModel rcm)
Sets a RowColorModel to define the correlation of row titles and colors used for the Legend. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Rectangle bounds
protected CoordSystem coord
protected MultiScatterDataModel model
protected RowColorModel rcm
protected double shapeSize
private java.awt.geom.AffineTransform last
private java.util.ArrayList transformed
private boolean buffer_transform
| Constructor Detail |
|---|
public MultiScatterChartRenderer(CoordSystem cs,
MultiScatterDataModel model)
rcm - the RowColorModel needed to determine the right colorscs - the CoordSystem used to translate values into pointsmodel - the DataModel that should be rendered| Method Detail |
|---|
public void renderChart(java.awt.Graphics2D g)
renderChart in class AbstractChartRendererg - the Graphics2D object in which to render
private void drawline(java.awt.geom.AffineTransform yaxis1,
int set,
java.awt.Graphics2D g)
yaxis1 - the transform to be usedset - the dataset to drawg - the graphics to be painted to
private void drawmarkers(java.awt.geom.AffineTransform yaxis1,
int set,
java.awt.Graphics2D g)
yaxis1 - the transform to be usedset - the dataset to drawg - the graphics to be painted topublic java.awt.Dimension getPreferredSize()
getPreferredSize in interface RenderergetPreferredSize in class AbstractChartRendererpublic void setBounds(java.awt.Rectangle bounds)
setBounds in interface RenderersetBounds in class AbstractChartRendererbounds - the new bounds for the renderer.public java.awt.Rectangle getBounds()
getBounds in interface RenderergetBounds in class AbstractChartRenderersetBounds has not
been called before, the bounds computed from
getPreferredSize is returned.public void render(java.awt.Graphics2D g)
render in interface Rendererrender in class AbstractChartRendererg - the Graphics2D object in which to renderpublic void setChartDataModel(ChartDataModel model)
setChartDataModel in class AbstractChartRenderermodel - the ChartDataModelpublic ChartDataModel getChartDataModel()
getChartDataModel in class AbstractChartRendererpublic CoordSystem getCoordSystem()
getCoordSystem in class AbstractChartRendererpublic void setCoordSystem(CoordSystem cs)
setCoordSystem in class AbstractChartRenderercs - the new CoordSystempublic java.awt.geom.AffineTransform getTransform(int axis)
getTransform in class AbstractChartRendereraxis - the y-axis to be used.public void setRowColorModel(RowColorModel rcm)
setRowColorModel in class AbstractChartRendererrcm - the RowColorModelpublic RowColorModel getRowColorModel()
getRowColorModel in class AbstractChartRendererpublic void fireDataUpdate()
public void setAllowBuffer(boolean value)
value - true to allow drawing, false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||