com.bbn.openmap
Class HintsMapBeanRepaintPolicy
java.lang.Object
|
+--com.bbn.openmap.MapHandlerChild
|
+--com.bbn.openmap.OMComponent
|
+--com.bbn.openmap.StandardMapBeanRepaintPolicy
|
+--com.bbn.openmap.HintsMapBeanRepaintPolicy
- All Implemented Interfaces:
- java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.lang.Cloneable, java.util.EventListener, LightMapHandlerChild, MapBeanRepaintPolicy, PropertyConsumer, SoloMapComponent
- public class HintsMapBeanRepaintPolicy
- extends StandardMapBeanRepaintPolicy
- implements java.lang.Cloneable
The class lets you set RenderingHints on the MapBean, to set
anti-aliasing, etc. This class can be added to the OpenMap
application via the openmap.components property in the
openmap.properties file.
Method Summary |
java.lang.Object |
clone()
Provide a configured copy (except for the MapBean). |
RenderingHintsRenderPolicy |
getHints()
|
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object,
reflecting the current values of the OMComponent. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting
the properties able to be set on this PropertyConsumer. |
java.awt.Graphics |
modifyGraphicsForPainting(java.awt.Graphics graphics)
A hook for the RepaintPolicy to make any adjustments to the
java.awt.Graphics object before sending the Graphics object to
the layers for painting. |
void |
setHints(RenderingHintsRenderPolicy rhrp)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
Methods inherited from class com.bbn.openmap.MapHandlerChild |
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hints
protected RenderingHintsRenderPolicy hints
HintsMapBeanRepaintPolicy
public HintsMapBeanRepaintPolicy()
HintsMapBeanRepaintPolicy
public HintsMapBeanRepaintPolicy(MapBean mb)
setHints
public void setHints(RenderingHintsRenderPolicy rhrp)
getHints
public RenderingHintsRenderPolicy getHints()
modifyGraphicsForPainting
public java.awt.Graphics modifyGraphicsForPainting(java.awt.Graphics graphics)
- A hook for the RepaintPolicy to make any adjustments to the
java.awt.Graphics object before sending the Graphics object to
the layers for painting. Gives the policy a chance to make
rendering hint changes on Graphic2D objects, setting
anti-aliasing configurations, etc. No modifications are made.
- Specified by:
modifyGraphicsForPainting
in interface MapBeanRepaintPolicy
- Overrides:
modifyGraphicsForPainting
in class StandardMapBeanRepaintPolicy
setProperties
public void setProperties(java.lang.String prefix,
java.util.Properties props)
- Description copied from class:
OMComponent
- Sets the properties for the OMComponent.
- Specified by:
setProperties
in interface PropertyConsumer
- Overrides:
setProperties
in class OMComponent
- Parameters:
prefix
- the token to prefix the property namesprops
- the Properties
object
getProperties
public java.util.Properties getProperties(java.util.Properties props)
- Description copied from class:
OMComponent
- PropertyConsumer method, to fill in a Properties object,
reflecting the current values of the OMComponent. If the
component has a propertyPrefix set, the property keys should
have that prefix plus a separating '.' prepended to each
propery key it uses for configuration.
- Specified by:
getProperties
in interface PropertyConsumer
- Overrides:
getProperties
in class OMComponent
- Parameters:
props
- a Properties object to load the PropertyConsumer
properties into. If props equals null, then a new
Properties object should be created.
- Returns:
- Properties object containing PropertyConsumer property
values. If getList was not null, this should equal
getList. Otherwise, it should be the Properties object
created by the PropertyConsumer.
getPropertyInfo
public java.util.Properties getPropertyInfo(java.util.Properties props)
- Description copied from class:
OMComponent
- Method to fill in a Properties object with values reflecting
the properties able to be set on this PropertyConsumer. The key
for each property should be the raw property name (without a
prefix) with a value that is a String that describes what the
property key represents, along with any other information about
the property that would be helpful (range, default value,
etc.). For Layer, this method should at least return the
'prettyName' property.
- Specified by:
getPropertyInfo
in interface PropertyConsumer
- Overrides:
getPropertyInfo
in class OMComponent
- Parameters:
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
- Returns:
- Properties object containing PropertyConsumer property
values. If getList was not null, this should equal
getList. Otherwise, it should be the Properties object
created by the PropertyConsumer.
clone
public java.lang.Object clone()
- Description copied from interface:
MapBeanRepaintPolicy
- Provide a configured copy (except for the MapBean).
- Specified by:
clone
in interface MapBeanRepaintPolicy
- Overrides:
clone
in class StandardMapBeanRepaintPolicy
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details