public class RenderingHintsRenderPolicy extends StandardRenderPolicy
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.
Modifier and Type | Field and Description |
---|---|
protected java.awt.RenderingHints |
renderingHints |
static java.lang.String |
RenderingHintsProperty |
composite, layer, logger
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
RenderingHintsRenderPolicy()
The layer needs to be set at some point before use.
|
RenderingHintsRenderPolicy(OMGraphicHandlerLayer layer) |
Modifier and Type | Method and Description |
---|---|
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.
|
getComposite, getLayer, prepare, prePrepare, setComposite, setCompositeOnGraphics, setLayer
getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
public static final java.lang.String RenderingHintsProperty
protected java.awt.RenderingHints renderingHints
public RenderingHintsRenderPolicy()
public RenderingHintsRenderPolicy(OMGraphicHandlerLayer layer)
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.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details