|
||||||||||
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.omGraphics.rule.Rule<T>
public abstract class Rule<T>
A Rule is an attribute inspector that makes decisions about rendering attributes, information line contents, tooltips and visibility based on scale.
Field Summary | |
---|---|
protected float |
displayMaxScale
|
protected float |
displayMinScale
|
protected DrawingAttributes |
drawingAttributes
|
protected java.util.List<java.lang.String> |
infolineFields
|
protected java.lang.String |
keyField
The property name where the testing value can be found for the rule to compare against the value. |
protected java.util.List<java.lang.String> |
labelFields
|
protected float |
labelMaxScale
|
protected float |
labelMinScale
|
protected RuleOp |
op
|
static java.lang.String |
RuleActionInfoline
|
static java.lang.String |
RuleActionLabel
|
static java.lang.String |
RuleActionMaxScale
|
static java.lang.String |
RuleActionMinScale
|
static java.lang.String |
RuleActionRender
|
static java.lang.String |
RuleActionTooltip
|
static java.lang.String |
RuleKeyProperty
|
static java.lang.String |
RuleListProperty
layer.rules=rule1 rule2 rule3 layer.rule1.key=CAPITAL layer.rule1.op=equals layer.rule1.val=Y layer.rule1.actions=render tooltip infoline layer.rule1.lineColor=FFFF0000 layer.rule1.minScale=10000 layer.rule1.maxScale=50000 layer.rule1.infoline=CITY_NAME layer.rule1.tooltip=ELEVATION |
static java.lang.String |
RuleOperatorProperty
|
static java.lang.String |
RuleValueProperty
|
protected java.util.List<java.lang.String> |
tooltipFields
|
protected java.lang.Object |
val
The value that the query runs the operation against. |
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 | |
---|---|
Rule()
|
Method Summary | |
---|---|
abstract boolean |
evaluate(T record)
Asks the Op class to evaluate the retrieved value against the Rules value. |
OMGraphic |
evaluate(T record,
OMGraphic omg,
Projection proj)
Evaluate the record against this rule. |
abstract java.lang.String |
getContent(java.util.List<java.lang.String> fieldNames,
T record)
Returns a String of concatenated record values. |
float |
getDisplayMaxScale()
|
float |
getDisplayMinScale()
|
DrawingAttributes |
getDrawingAttribtues()
|
java.lang.String |
getFieldsAsString(java.util.List<java.lang.String> fieldNames)
Returns a String of concatenated record values. |
java.util.List<java.lang.String> |
getInfolineFields()
|
java.lang.String |
getKeyName()
|
java.util.List<java.lang.String> |
getLabelFields()
|
float |
getLabelMaxScale()
|
float |
getLabelMinScale()
|
RuleOp |
getOp()
|
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.List<java.lang.String> |
getStringFromFields(java.lang.String fieldString)
Create a List of Strings from a list of space separated strings. |
java.util.List<java.lang.String> |
getTooltipFields()
|
java.lang.Object |
getVal()
|
void |
setDisplayMaxScale(float displayMaxScale)
|
void |
setDisplayMinScale(float displayMinScale)
|
void |
setDrawingAttributes(DrawingAttributes da)
|
void |
setInfolineFields(java.util.List<java.lang.String> infolineFields)
|
void |
setKeyName(java.lang.String keyName)
|
void |
setLabelFields(java.util.List<java.lang.String> labelFields)
|
void |
setLabelMaxScale(float labelMaxScale)
|
void |
setLabelMinScale(float labelMinScale)
|
void |
setOp(RuleOp op)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
void |
setTooltipFields(java.util.List<java.lang.String> tooltipFields)
|
void |
setVal(java.lang.Object val)
|
Methods inherited from class com.bbn.openmap.OMComponent |
---|
getPropertyInfo, 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 |
---|
protected java.lang.String keyField
protected java.util.List<java.lang.String> tooltipFields
protected java.util.List<java.lang.String> infolineFields
protected java.util.List<java.lang.String> labelFields
protected java.lang.Object val
protected RuleOp op
protected DrawingAttributes drawingAttributes
protected float displayMinScale
protected float displayMaxScale
protected float labelMinScale
protected float labelMaxScale
public static final java.lang.String RuleListProperty
layer.rules=rule1 rule2 rule3 layer.rule1.key=CAPITAL layer.rule1.op=equals layer.rule1.val=Y layer.rule1.actions=render tooltip infoline layer.rule1.lineColor=FFFF0000 layer.rule1.minScale=10000 layer.rule1.maxScale=50000 layer.rule1.infoline=CITY_NAME layer.rule1.tooltip=ELEVATION
public static final java.lang.String RuleKeyProperty
public static final java.lang.String RuleOperatorProperty
public static final java.lang.String RuleValueProperty
public static final java.lang.String RuleActionRender
public static final java.lang.String RuleActionTooltip
public static final java.lang.String RuleActionInfoline
public static final java.lang.String RuleActionLabel
public static final java.lang.String RuleActionMinScale
public static final java.lang.String RuleActionMaxScale
Constructor Detail |
---|
public Rule()
Method Detail |
---|
public abstract boolean evaluate(T record)
record
- object to evaluate
public abstract java.lang.String getContent(java.util.List<java.lang.String> fieldNames, T record)
fieldNames
- a list of string keys for fields to be used.record
- The record object to look up values for the list of keys.
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 OMGraphic evaluate(T record, OMGraphic omg, Projection proj)
record
- A Map of attributes for a particular OMGraphic/map object.
The indices for the rule are indexes into this record.omg
- The OMGraphic to evaluate.proj
- The current map projection.
public java.lang.String getFieldsAsString(java.util.List<java.lang.String> fieldNames)
fieldNames
- names of field properties
public java.util.List<java.lang.String> getStringFromFields(java.lang.String fieldString)
fieldString
-
public DrawingAttributes getDrawingAttribtues()
public void setDrawingAttributes(DrawingAttributes da)
public float getDisplayMaxScale()
public void setDisplayMaxScale(float displayMaxScale)
public float getDisplayMinScale()
public void setDisplayMinScale(float displayMinScale)
public java.lang.String getKeyName()
public void setKeyName(java.lang.String keyName)
public java.util.List<java.lang.String> getLabelFields()
public void setLabelFields(java.util.List<java.lang.String> labelFields)
public java.util.List<java.lang.String> getInfolineFields()
public void setInfolineFields(java.util.List<java.lang.String> infolineFields)
public java.util.List<java.lang.String> getTooltipFields()
public void setTooltipFields(java.util.List<java.lang.String> tooltipFields)
public float getLabelMaxScale()
public void setLabelMaxScale(float labelMaxScale)
public float getLabelMinScale()
public void setLabelMinScale(float labelMinScale)
public RuleOp getOp()
public void setOp(RuleOp op)
public java.lang.Object getVal()
public void setVal(java.lang.Object val)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |