com.bbn.openmap.layer.policy
Class BufferedImageRenderPolicy
java.lang.Object
com.bbn.openmap.MapHandlerChild
com.bbn.openmap.OMComponent
com.bbn.openmap.layer.policy.StandardRenderPolicy
com.bbn.openmap.layer.policy.RenderingHintsRenderPolicy
com.bbn.openmap.layer.policy.BufferedImageRenderPolicy
- All Implemented Interfaces:
- RenderPolicy, LightMapHandlerChild, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener
public class BufferedImageRenderPolicy
- extends RenderingHintsRenderPolicy
The BufferedImageRenderPolicy is a RenderPolicy that creates and uses an
image buffer based on the painting times for the layer. If the time to paint
exceeds the bufferTiggerDelay, an image buffer for the layer is used for
paints as long as the projection doesn't change. A new buffer is used for a
projection change because we need the image buffer to be transparent for
parts of the map that are not used by the layer.
Methods inherited from class com.bbn.openmap.MapHandlerChild |
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
imageBuffer
protected BufferedImageRenderPolicy.ImageBuffer imageBuffer
BufferedImageRenderPolicy
public BufferedImageRenderPolicy()
- Set the layer at some point before use.
BufferedImageRenderPolicy
public BufferedImageRenderPolicy(OMGraphicHandlerLayer layer)
- Don't pass in a null layer.
setImageBuffer
protected void setImageBuffer(BufferedImageRenderPolicy.ImageBuffer iBuffer)
- Set the ImageBuffer, for subclasses to modify it's particular behavior
getImageBuffer
protected BufferedImageRenderPolicy.ImageBuffer getImageBuffer()
- Returns:
- the imageBuffer
prePrepare
public void prePrepare(Projection newProj)
- Called from the OMGraphicHandlerLayer's projectionChanged() method. This
method updates the current image buffer so it can be re-projected for the
current projection before the layer worker goes off to do more work. In
case of rapid projection changes, the layer should be able to display the
current buffer in the right place, at least. Ghah! Don't do a lot of work
in this thread.
- Specified by:
prePrepare
in interface RenderPolicy
- Overrides:
prePrepare
in class StandardRenderPolicy
- Parameters:
newProj
- the newest projection known.
prepare
public OMGraphicList prepare()
- Description copied from interface:
RenderPolicy
- Called when an OMGraphicHandlerLayer should begin preparing OMGraphics
for the map. This is a hook into the list to help RenderPolicy make
decisions or set up the list for faster rendering.
- Specified by:
prepare
in interface RenderPolicy
- Overrides:
prepare
in class StandardRenderPolicy
paint
public void paint(java.awt.Graphics g)
- Description copied from class:
RenderingHintsRenderPolicy
- If you are going to change the Graphics object in this method, you should
make a copy of it first using the Graphics.create() method so the changes
won't affect other layers.
- Specified by:
paint
in interface RenderPolicy
- Overrides:
paint
in class RenderingHintsRenderPolicy
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details