|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.chart.SingleImageLazyChartRenderer
public class SingleImageLazyChartRenderer
This class maintains a single Image for all the models added to a chart.
Constructor Summary | |
---|---|
SingleImageLazyChartRenderer(Chart chart)
Create a LazyChartRenderer for the supplied chart instance |
Method Summary | |
---|---|
void |
actionPerformed(ActionEvent e)
Called at the end of a delay by a SwingTimer. |
void |
addImageChangeListener(ImageChangeListener listener)
|
void |
cancelDrawing()
Cancel drawing |
void |
draw(Graphics g)
Draw the latest image (if any) into the supplied graphics context |
void |
drawImmediately()
Creates a background thread to do the plotting. |
protected void |
fireImageChange()
|
Chart |
getChart()
Returns the chart used by this lazy chart renderer. |
ChartModel |
getModel()
Returns the first model of the list of ChartModels, or null there are no models |
boolean |
isAtFront()
Always returns false as the lazy chart renderer is always at the back so it can cast a shadow if shadows are switched on. |
long |
lastModified()
A read-only property so that a user can find out how old the current image is |
void |
removeImage(ChartModel chartModel)
Removes the image cached for the supplied model |
void |
removeImageChangeListener(ImageChangeListener listener)
|
void |
setAtFront(boolean atFront)
Specify whether the object should be drawn at the front: setAtFront(true) is like a
toFront() request, but conforms to the JavaBean property pattern. |
void |
updateCharts(boolean clearAll)
Lodges a request to redraw the plot sometime soon. |
void |
updateImage(ChartModel chartModel,
boolean canUseCache)
Updates the image in response to a change to an individual model; for example a change to the style for that model. |
void |
updateImage(Image image,
Point2D topLeft,
Point2D bottomRight)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleImageLazyChartRenderer(Chart chart)
chart
- the chart for which we want to prepare the display lazily.Method Detail |
---|
public Chart getChart()
public long lastModified()
public ChartModel getModel()
public void addImageChangeListener(ImageChangeListener listener)
public void removeImageChangeListener(ImageChangeListener listener)
protected void fireImageChange()
public void updateImage(ChartModel chartModel, boolean canUseCache)
chartModel
- the model for which a change occurredcanUseCache
- specify whether it is allowed to retrieve the cached Image instead of redrawingpublic void removeImage(ChartModel chartModel)
chartModel
- the model whose painted and cached image is to be removedpublic void cancelDrawing()
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void drawImmediately()
public void updateImage(Image image, Point2D topLeft, Point2D bottomRight)
public void updateCharts(boolean clearAll)
clearAll
- if clearAll is set to true then all the previously painted model images are purged from memorypublic void draw(Graphics g)
g
- the Graphics contextpublic boolean isAtFront()
isAtFront
in interface Frontable
public void setAtFront(boolean atFront)
Frontable
setAtFront(true)
is like a
toFront()
request, but conforms to the JavaBean property pattern. Similarly, to send
an object to the back, call setAtFront(false)
.
setAtFront
in interface Frontable
atFront
- whether the object is to be shown in front of ChartModels.
UnsupportedOperationException
- as the LazyChartRenderer must always appear at the back
in case shadows are switched on
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |