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:
- java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, LightMapHandlerChild, PropertyConsumer, RenderPolicy
- 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.
Method Summary |
protected java.awt.image.BufferedImage |
createAndPaintImageBuffer(OMGraphicList list)
|
protected java.awt.image.BufferedImage |
getBuffer()
Get the BufferedImage for the layer. |
boolean |
isUseImageBuffer()
|
void |
paint(java.awt.Graphics g)
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. |
OMGraphicList |
prepare()
Called when an OMGraphicHandlerLayer should begin preparing
OMGraphics for the map. |
protected void |
setBuffer(java.awt.image.BufferedImage bi)
Set the BufferedImage for the layer. |
void |
setUseImageBuffer(boolean value)
|
Methods inherited from class com.bbn.openmap.MapHandlerChild |
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bufferTriggerDelay
public static final long bufferTriggerDelay
- See Also:
- Constant Field Values
buffer
protected java.awt.image.BufferedImage buffer
useImageBuffer
protected boolean useImageBuffer
DEBUG
protected boolean DEBUG
BufferedImageRenderPolicy
public BufferedImageRenderPolicy()
- Set the layer at some point before use.
BufferedImageRenderPolicy
public BufferedImageRenderPolicy(OMGraphicHandlerLayer layer)
- Don't pass in a null layer.
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
getBuffer
protected java.awt.image.BufferedImage getBuffer()
- Get the BufferedImage for the layer.
setBuffer
protected void setBuffer(java.awt.image.BufferedImage bi)
- Set the BufferedImage for the layer.
createAndPaintImageBuffer
protected java.awt.image.BufferedImage createAndPaintImageBuffer(OMGraphicList list)
setUseImageBuffer
public void setUseImageBuffer(boolean value)
isUseImageBuffer
public boolean isUseImageBuffer()
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details