|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bbn.openmap.MapHandlerChild
com.bbn.openmap.OMComponent
com.bbn.openmap.layer.location.AbstractLocationHandler
public abstract class AbstractLocationHandler
The AbstractLocationHandler class facilitates the implementation of
a LocationHandler by implementing a number of methods. By
extending this class, a developer need only implement get(), setProperties(),
and reloadData().
locationhandler.location.lineColor=FF0000
locationhandler.name.lineColor=008C54
locationhandler.showNames=false
locationhandler.showLocations=true
locationhandler.override=true
# optional, can be used if you override createLocation and need access to varying rendering attributes.
# ra1, ra2 and ra3 would be used as keys in renderAttributes map. All GraphicAttributes properties are available, not
# just lineColor.
locationhandler.renderAttributesList=ra1 ra2 ra3
locationhandler.ra1.lineColor=0xFFFF0000
locationhandler.ra2.lineColor=0xFF00FF00
locationhandler.ra3.lineColor=0xFF00FFFF
LocationHandler| Field Summary | |
|---|---|
protected I18n |
i18n
All LocationHandlers have access to an I18n object, which is provided by the Environment. |
protected static java.util.logging.Logger |
logger
|
static java.lang.String |
RenderAttributesListProperty
Property for properties to populate the renderAttributes HashMap. |
protected LocationLayer |
zLayer
The parent layer. |
| Fields inherited from class com.bbn.openmap.OMComponent |
|---|
propertyPrefix |
| Fields inherited from class com.bbn.openmap.MapHandlerChild |
|---|
beanContextChildSupport, isolated |
| Fields inherited from interface com.bbn.openmap.layer.location.LocationHandler |
|---|
defaultLocationColorString, defaultNameColorString, forceGlobalCommand, ForceGlobalProperty, LocationPropertyPrefix, NamePropertyPrefix, readDataCommand, showdetails, showLocationsCommand, ShowLocationsProperty, showname, showNamesCommand, ShowNamesProperty |
| Fields inherited from interface com.bbn.openmap.PropertyConsumer |
|---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
| Constructor Summary | |
|---|---|
protected |
AbstractLocationHandler()
|
| Method Summary | |
|---|---|
java.util.List<java.awt.Component> |
getItemsForPopupMenu(Location loc)
The location layer passes a LocationPopupMenu to the handler when on of its locations has been clicked on. |
LocationLayer |
getLayer()
Get the layer the handler is serving. |
java.awt.Color |
getLocationColor()
Get the color used for the location graphic. |
GraphicAttributes |
getLocationDrawingAttributes()
|
java.awt.Color |
getNameColor()
Get the color used for the name label. |
GraphicAttributes |
getNameDrawingAttributes()
|
java.lang.String |
getPrettyName()
Get the GUI pretty name for the data set retrieved by this LocationHandler. |
java.util.Properties |
getProperties(java.util.Properties props)
PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer. |
java.util.Properties |
getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups. |
boolean |
isForceGlobal()
Find out whether global settings should override local ones. |
boolean |
isShowLocations()
See if the handler is displaying location graphics at a global level. |
boolean |
isShowNames()
See if the handler is displaying labels at a global level. |
void |
removed(java.awt.Container cont)
Called by the LocationLayer when the layer is removed from the map. |
void |
setForceGlobal(boolean set)
Set whether global settings should override local ones. |
void |
setLayer(LocationLayer l)
Set the layer the handler is responding to. |
void |
setLocationColor(java.awt.Color lColor)
Set the color used for the location graphic. |
void |
setLocationDrawingAttributes(GraphicAttributes lda)
|
void |
setNameColor(java.awt.Color nColor)
Set the color used for the name label. |
void |
setNameDrawingAttributes(GraphicAttributes nda)
|
void |
setPrettyName(java.lang.String prettyName)
Set the name used in the GUI to represent this data set. |
void |
setProperties(java.util.Properties props)
Sets the properties for the handler. |
void |
setProperties(java.lang.String prefix,
java.util.Properties properties)
Set up the properties of the handler. |
void |
setPropertyPrefix(java.lang.String prefix)
Set the property key prefix that should be used by the PropertyConsumer. |
void |
setShowLocations(boolean set)
Set the handler to show/hide location graphics at a global level. |
void |
setShowNames(boolean set)
Set the handler to show/hide labels at a global level. |
| 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 |
| Methods inherited from interface com.bbn.openmap.layer.location.LocationHandler |
|---|
get, getGUI, reloadData |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
protected LocationLayer zLayer
public static final java.lang.String RenderAttributesListProperty
protected transient I18n i18n
| Constructor Detail |
|---|
protected AbstractLocationHandler()
| Method Detail |
|---|
public void setLayer(LocationLayer l)
setLayer in interface LocationHandlerl - a LocationLayerpublic LocationLayer getLayer()
getLayer in interface LocationHandlerpublic boolean isShowNames()
isShowNames in interface LocationHandlerpublic void setShowNames(boolean set)
setShowNames in interface LocationHandlerpublic boolean isShowLocations()
isShowLocations in interface LocationHandlerpublic void setShowLocations(boolean set)
setShowLocations in interface LocationHandlerpublic boolean isForceGlobal()
isForceGlobal in interface LocationHandlerpublic void setForceGlobal(boolean set)
setForceGlobal in interface LocationHandlerpublic void setNameColor(java.awt.Color nColor)
public java.awt.Color getNameColor()
public void setLocationColor(java.awt.Color lColor)
public java.awt.Color getLocationColor()
public java.util.List<java.awt.Component> getItemsForPopupMenu(Location loc)
LocationHandler
getItemsForPopupMenu in interface LocationHandlerloc - Location that items should be provided for.public void removed(java.awt.Container cont)
removed in interface LocationHandlercont - Container being removed from.public void setProperties(java.util.Properties props)
setProperties in interface PropertyConsumersetProperties in class OMComponentprops - the Properties object.
public void setProperties(java.lang.String prefix,
java.util.Properties properties)
setProperties in interface PropertyConsumersetProperties in class OMComponentprefix - the token to prefix the property namesproperties - the Properties objectpublic java.util.Properties getProperties(java.util.Properties props)
getProperties in interface PropertyConsumergetProperties in class OMComponentprops - 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 list)
getPropertyInfo in interface PropertyConsumergetPropertyInfo in class OMComponentlist - a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
public void setPropertyPrefix(java.lang.String prefix)
setPropertyPrefix in interface PropertyConsumersetPropertyPrefix in class OMComponentprefix - the prefix String.public java.lang.String getPropertyPrefix()
getPropertyPrefix in interface PropertyConsumergetPropertyPrefix in class OMComponentpublic GraphicAttributes getLocationDrawingAttributes()
public void setLocationDrawingAttributes(GraphicAttributes lda)
public GraphicAttributes getNameDrawingAttributes()
public void setNameDrawingAttributes(GraphicAttributes nda)
public void setPrettyName(java.lang.String prettyName)
setPrettyName in interface LocationHandlerprettyName - A GUI pretty name.public java.lang.String getPrettyName()
getPrettyName in interface LocationHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||