com.bbn.openmap.layer.policy
Interface RenderPolicy

All Known Implementing Classes:
StandardRenderPolicy

public interface RenderPolicy

A policy object that can be used by an OMGraphicHandlerLayer to figure out the best way to paint on the map.


Method Summary
 java.awt.Composite getComposite()
           
 OMGraphicHandlerLayer getLayer()
          A method to get the parent layer on the RenderPolicy.
 void paint(java.awt.Graphics g)
          Called from OMGraphicHandlerLayer.paint(Graphics), so the policy can handle the painting for the layer.
 OMGraphicList prepare()
          Called when an OMGraphicHandlerLayer should begin preparing OMGraphics for the map.
 void setComposite(java.awt.Composite composite)
          Set a Composite object on a Graphics2D object before rendering.
 void setLayer(OMGraphicHandlerLayer layer)
          A method to set the parent layer on the RenderPolicy.
 

Method Detail

setLayer

public void setLayer(OMGraphicHandlerLayer layer)
A method to set the parent layer on the RenderPolicy.


getLayer

public OMGraphicHandlerLayer getLayer()
A method to get the parent layer on the RenderPolicy.


setComposite

public void setComposite(java.awt.Composite composite)
Set a Composite object on a Graphics2D object before rendering. Set to null (default) to not do anything.


getComposite

public java.awt.Composite getComposite()

prepare

public OMGraphicList prepare()
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.


paint

public void paint(java.awt.Graphics g)
Called from OMGraphicHandlerLayer.paint(Graphics), so the policy can handle the painting for the layer. 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.



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