com.bbn.openmap.layer.policy
Class StandardRenderPolicy

java.lang.Object
  extended by com.bbn.openmap.MapHandlerChild
      extended by com.bbn.openmap.OMComponent
          extended by com.bbn.openmap.layer.policy.StandardRenderPolicy
All Implemented Interfaces:
RenderPolicy, LightMapHandlerChild, PropertyConsumer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener
Direct Known Subclasses:
FullProjectionRenderPolicy, RenderingHintsRenderPolicy

public class StandardRenderPolicy
extends OMComponent
implements RenderPolicy

The StandardRenderPolicy is a RenderPolicy that simply paints the current graphic list. No conditions or deviations are considered.


Field Summary
protected  java.awt.Composite composite
           
protected  OMGraphicHandlerLayer layer
          Don't let this be null, nothing will happen.
static java.util.logging.Logger logger
           
 
Fields inherited from class com.bbn.openmap.OMComponent
i18n, propertyPrefix
 
Fields inherited from class com.bbn.openmap.MapHandlerChild
beanContextChildSupport, isolated
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Constructor Summary
StandardRenderPolicy()
           
StandardRenderPolicy(OMGraphicHandlerLayer layer)
          Don't pass in a null layer.
 
Method Summary
 java.awt.Composite getComposite()
           
 OMGraphicHandlerLayer getLayer()
          A method to get the parent layer on the RenderPolicy.
 void paint(java.awt.Graphics g)
          Assumes that the OMGraphicList to be rendered is set on the OMGraphicHandlerLayer, available via setList().
 OMGraphicList prepare()
          Called when an OMGraphicHandlerLayer should begin preparing OMGraphics for the map.
 void prePrepare(Projection newProj)
          The StandardRenderPolicy doesn't need to do anything before prepare() returns.
 void setComposite(java.awt.Composite composite)
          Can be used to set Composite objects (like AlphaComposite) on Graphics2D objects before the layer is painted.
protected  void setCompositeOnGraphics(java.awt.Graphics2D g)
          Call made by the policy from the paint(g) method in order to set the composite on the Graphics2D object.
 void setLayer(OMGraphicHandlerLayer l)
          A method to set the parent layer on the RenderPolicy.
 
Methods inherited from class com.bbn.openmap.OMComponent
getProperties, getPropertyInfo, getPropertyPrefix, setProperties, setProperties, setPropertyPrefix
 
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
 

Field Detail

logger

public static java.util.logging.Logger logger

layer

protected OMGraphicHandlerLayer layer
Don't let this be null, nothing will happen. At all.


composite

protected java.awt.Composite composite
Constructor Detail

StandardRenderPolicy

public StandardRenderPolicy()

StandardRenderPolicy

public StandardRenderPolicy(OMGraphicHandlerLayer layer)
Don't pass in a null layer.

Method Detail

setLayer

public void setLayer(OMGraphicHandlerLayer l)
Description copied from interface: RenderPolicy
A method to set the parent layer on the RenderPolicy.

Specified by:
setLayer in interface RenderPolicy

getLayer

public OMGraphicHandlerLayer getLayer()
Description copied from interface: RenderPolicy
A method to get the parent layer on the RenderPolicy.

Specified by:
getLayer in interface RenderPolicy

getComposite

public java.awt.Composite getComposite()
Specified by:
getComposite in interface RenderPolicy

setComposite

public void setComposite(java.awt.Composite composite)
Can be used to set Composite objects (like AlphaComposite) on Graphics2D objects before the layer is painted.

Specified by:
setComposite in interface RenderPolicy
Parameters:
composite -

setCompositeOnGraphics

protected void setCompositeOnGraphics(java.awt.Graphics2D g)
Call made by the policy from the paint(g) method in order to set the composite on the Graphics2D object. This method is meant to be overridden if needed.

Parameters:
g - Graphics2D that the Composite will be set on.

prePrepare

public void prePrepare(Projection newProj)
The StandardRenderPolicy doesn't need to do anything before prepare() returns.

Specified by:
prePrepare in interface RenderPolicy
Parameters:
newProj - the new projection received in a projectionChanged method for the 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

paint

public void paint(java.awt.Graphics g)
Assumes that the OMGraphicList to be rendered is set on the OMGraphicHandlerLayer, available via setList().

Specified by:
paint in interface RenderPolicy


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details