|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.MapHandlerChild com.bbn.openmap.OMComponent com.bbn.openmap.layer.policy.StandardRenderPolicy com.bbn.openmap.layer.policy.RenderingHintsRenderPolicy
public class RenderingHintsRenderPolicy
The RenderingHintsRenderPolicy is a StandardRenderPolicy that lets you set RenderingHints on the java.awt.Graphics object before the layer is painted, and then simply paints the current graphic list. No conditions or deviations are considered. This class can be set with properties.
The properties have to look like:
prefix.renderingHints=RENDERINGHINTS_KEY1 RENDERINGHINTS_KEY2 prefix.RENDERINGHINTS_KEY1=RENDERINGHINTS_VALUE1 prefix.RENDERINGHINTS_KEY2=RENDERINGHINTS_VALUE2For example, for a GraticuleLayer in the properties file with a 'graticule' prefix:
graticule.renderPolicy=textAliasing graticule.textAliasing.class=com.bbn.openmap.layer.policy.RenderingHintsRenderPolicy graticule.textAliasing.renderingHints=KEY_TEXT_ANTIALIASING graticule.textAliasing.KEY_TEXT_ANTIALIASING=VALUE_TEXT_ANTIALIAS_ONThe HintsMapBeanRepaintPolicy uses a RenderingHintsRenderPolicy with properties that look like these, where 'repaintPolicy' is the prefix for the RenderingHintsRenderPolicy:
repaintPolicy.class=com.bbn.openmap.HintsMapBeanRepaintPolicy repaintPolicy.renderingHints=KEY_ANTIALIASING repaintPolicy.KEY_ANTIALIASING=VALUE_ANTIALIAS_ON repaintPolicy.KEY_RENDERING=VALUE_RENDER_SPEEDSee the java.awt.RenderingHints javadocs for the key-value pairs that can be used.
Field Summary | |
---|---|
protected java.awt.RenderingHints |
renderingHints
|
static java.lang.String |
RenderingHintsProperty
|
Fields inherited from class com.bbn.openmap.layer.policy.StandardRenderPolicy |
---|
composite, layer, 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 | |
---|---|
RenderingHintsRenderPolicy()
The layer needs to be set at some point before use. |
|
RenderingHintsRenderPolicy(OMGraphicHandlerLayer layer)
|
Method Summary | |
---|---|
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.RenderingHints |
getRenderingHints()
Get the RenderingHints Map that should be used on the MapBean. |
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. |
void |
put(java.lang.Object key,
java.lang.Object value)
Set a RenderingHint on this object. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
void |
setRenderingHints(java.awt.Graphics g)
|
void |
setRenderingHints(java.awt.RenderingHints rh)
Set the RenderingHints Map that should be used on the MapBean. |
Methods inherited from class com.bbn.openmap.layer.policy.StandardRenderPolicy |
---|
getComposite, getLayer, prepare, prePrepare, setComposite, setCompositeOnGraphics, setLayer |
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getPropertyPrefix, 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 |
---|
public static final java.lang.String RenderingHintsProperty
protected java.awt.RenderingHints renderingHints
Constructor Detail |
---|
public RenderingHintsRenderPolicy()
public RenderingHintsRenderPolicy(OMGraphicHandlerLayer layer)
Method Detail |
---|
public void setRenderingHints(java.awt.RenderingHints rh)
public java.awt.RenderingHints getRenderingHints()
public void put(java.lang.Object key, java.lang.Object value)
key
- RenderingHint KEYvalue
- RenderingHint VALUEpublic void paint(java.awt.Graphics g)
paint
in interface RenderPolicy
paint
in class StandardRenderPolicy
public void setRenderingHints(java.awt.Graphics g)
public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class OMComponent
prefix
- the token to prefix the property namesprops
- the Properties
objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties
in interface PropertyConsumer
getProperties
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If props equals null, then a new Properties object should be
created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
OMComponent
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class OMComponent
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |