JIDE 3.5.15

com.jidesoft.chart
Class MultiImageLazyChartRenderer

java.lang.Object
  extended by com.jidesoft.chart.MultiImageLazyChartRenderer

public class MultiImageLazyChartRenderer
extends Object

This class maintains a separate Image for each model added to a chart. This means that the models can easily be switched off and on by way of a ChartStyle. It also means that a chart can be built up incrementally, one model at a time.


Constructor Summary
MultiImageLazyChartRenderer(Chart chart)
           
 
Method Summary
 void addImageChangeListener(ImageChangeListener listener)
           
 void cancelDrawing()
          Cancel drawing
 void draw(Graphics g)
          Draw the latest image (if any) into the supplied graphics context
protected  void fireImageChange()
           
 void removeImage(ChartModel model)
          Removes the image cached for the supplied model
 void removeImage(String modelName)
           
 void removeImageChangeListener(ImageChangeListener listener)
           
 void updateCharts(boolean clearAll)
           
 void updateImage(ChartModel model, boolean canUseCache)
          Updates the image in response to a change to an individual model; for example a change to the style for that model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiImageLazyChartRenderer

public MultiImageLazyChartRenderer(Chart chart)
Method Detail

addImageChangeListener

public void addImageChangeListener(ImageChangeListener listener)

removeImageChangeListener

public void removeImageChangeListener(ImageChangeListener listener)

fireImageChange

protected void fireImageChange()

updateCharts

public void updateCharts(boolean clearAll)
Parameters:
clearAll - if clearAll is set to true then all the previously painted model images are purged from memory

cancelDrawing

public void cancelDrawing()
Cancel drawing


updateImage

public void updateImage(ChartModel model,
                        boolean canUseCache)
Updates the image in response to a change to an individual model; for example a change to the style for that model.

Parameters:
model - the model for which a change occurred
canUseCache - specify whether it is allowed to retrieve the cached Image instead of redrawing

removeImage

public void removeImage(String modelName)

removeImage

public void removeImage(ChartModel model)
Removes the image cached for the supplied model

Parameters:
model - the model whose painted and cached image is to be removed

draw

public void draw(Graphics g)
Draw the latest image (if any) into the supplied graphics context

Parameters:
g - the Graphics context

JIDE 3.5.15