|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.approximatrix.charting.render.AbstractChartRenderer
public abstract class AbstractChartRenderer
This class is the superclass for all the different ChartRenderer.
| Field Summary | |
|---|---|
protected java.awt.Rectangle |
bounds
|
protected CoordSystem |
coord
|
protected javax.swing.event.EventListenerList |
listener
The listener list. |
protected ChartDataModel |
model
|
protected RowColorModel |
rcm
|
protected boolean |
stopFlag
Flag indicating all rendering should be interrupted asap. |
| Constructor Summary | |
|---|---|
protected |
AbstractChartRenderer(ChartDataModel model)
Creates new AbstractChartRenderer |
|
AbstractChartRenderer(CoordSystem cs,
ChartDataModel model)
Creates new AbstractChartRenderer |
| Method Summary | |
|---|---|
void |
addRenderChangeListener(RenderChangeListener l)
Adds a RenderChangeListener. |
void |
clearRenderChangeListeners()
Clears all RenderChangeListeners from the object |
void |
fireRenderChangeEvent()
Protected function that fires a render change event, notifying any listeners that this renderable component needs to be redrawn. |
java.awt.Rectangle |
getBounds()
Gets the 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 preferred size needed for the renderer. |
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 |
interruptRendering()
Causes rendering to be interrupted. |
void |
removeRenderChangeListener(RenderChangeListener l)
Removes a RenderChangeListener. |
void |
render(java.awt.Graphics2D g)
Calls renderChart(g) and crops the output to the desired
bounds. |
abstract void |
renderChart(java.awt.Graphics2D g)
Finally renders the chart in the clipped rectangle. |
protected void |
resetStopFlag()
Resets the stop rendering flag |
void |
setBounds(java.awt.Rectangle bounds)
Sets the bounds the layout manager has assigned to 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 ChartDataModel model
protected RowColorModel rcm
protected volatile boolean stopFlag
protected javax.swing.event.EventListenerList listener
| Constructor Detail |
|---|
protected AbstractChartRenderer(ChartDataModel model)
model - the DataModel that should be rendered
public AbstractChartRenderer(CoordSystem cs,
ChartDataModel model)
cs - the CoordSystem which contains the AffineTransforms to translate
into pixel spacercm - the RowColorModel that defines the correspondence between row titles and colorsmodel - the DataModel that should be rendered| Method Detail |
|---|
public java.awt.Rectangle getBounds()
getBounds in interface RenderersetBounds has not
been called before, the bounds computed from
getPreferredSize is returned.public java.awt.Dimension getPreferredSize()
getPreferredSize in interface Rendererpublic void render(java.awt.Graphics2D g)
renderChart(g) and crops the output to the desired
bounds. This way you can manually set small maximum and minimum values
which automatically gets reflected in the CoordSystem but the ChartRenderer
doesn't need to care.
render in interface Rendererg - the Graphics2D object in which to renderpublic abstract void renderChart(java.awt.Graphics2D g)
public void setBounds(java.awt.Rectangle bounds)
setBounds in interface Rendererbounds - the new bounds for the renderer.public void setChartDataModel(ChartDataModel model)
model - the ChartDataModelpublic ChartDataModel getChartDataModel()
public CoordSystem getCoordSystem()
public void setCoordSystem(CoordSystem cs)
cs - the new CoordSystempublic java.awt.geom.AffineTransform getTransform(int axis)
axis - the y-axis to be used.public void setRowColorModel(RowColorModel rcm)
rcm - the RowColorModelpublic RowColorModel getRowColorModel()
public void fireRenderChangeEvent()
fireRenderChangeEvent in interface Rendererpublic void removeRenderChangeListener(RenderChangeListener l)
removeRenderChangeListener in interface Rendererl - the RenderChangeListenerpublic void addRenderChangeListener(RenderChangeListener l)
addRenderChangeListener in interface Rendererl - the RenderChangeListenerpublic void clearRenderChangeListeners()
clearRenderChangeListeners in interface Rendererpublic void interruptRendering()
protected void resetStopFlag()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||