|
||||||||||
| 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.event.AbstractMouseMode
com.bbn.openmap.event.CoordMouseMode
public abstract class CoordMouseMode
The CoordMouseMode is an abstract MouseMode extension to AbstractMouseMode that can be used for Modes that want to use the BeanContext to hook up with the InformationDelegator, and to send coordinate updates to be displayed in the infoline.
The CoordMouseMode has been updated to use CoordInfoFormatters to allow more flexibility in how coordinates are displayed in the InformationDelegator. You can use the 'coordFormatter' property to set a particular CoordInfoFormatter for this mouse mode. If you add a CoordInfoFormatterHandler to the MapHandler, the mouse mode will use whatever formatter is active in that CoordInfoFormatterHandler instead of what's specified in the properties.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.bbn.openmap.event.AbstractMouseMode |
|---|
AbstractMouseMode.MouseWheelTimerListener |
| Field Summary | |
|---|---|
protected CoordInfoFormatter |
coordFormatter
|
protected CoordInfoFormatterHandler |
coordFormatterHandler
|
static java.lang.String |
CoordFormatterProperty
'coordFormatter' property for setting the class of the coordinate formatter. |
InformationDelegator |
infoDelegator
The info delegator that will display the distance information |
| 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 | |
|---|---|
CoordMouseMode()
|
|
CoordMouseMode(java.lang.String modeID,
boolean shouldConsumeEvents)
|
|
| Method Summary | |
|---|---|
void |
findAndInit(java.lang.Object someObj)
Called when a CoordMouseMode is added to a BeanContext, or when another object is added to the BeanContext after that. |
void |
findAndUndo(java.lang.Object someObj)
BeanContextMembershipListener method. |
void |
fireMouseLocation(java.awt.event.MouseEvent e)
Sends the mouse event location, x/y and lat/lon, to the InformationDelegator. |
CoordInfoFormatter |
getCoordFormatter()
|
CoordInfoFormatterHandler |
getCoordFormatterHandler()
|
InformationDelegator |
getInfoDelegator()
Return the information delegator. |
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. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Fires a mouse location to the InformationDelegator, and then calls the super class method which calls the MouseSupport method. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Fires a mouse location to the InformationDelegator, and then calls the super class method which calls the MouseSupport method. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
setActive(boolean active)
If the MouseMode has been made inactive, clean out any input that might have been made to the info line. |
void |
setCoordFormatter(CoordInfoFormatter coordFormatter)
|
void |
setCoordFormatterHandler(CoordInfoFormatterHandler coordFormatterHandler)
|
void |
setInfoDelegator(InformationDelegator id)
Set the information delegator. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Sets the properties for the OMComponent. |
| Methods inherited from class com.bbn.openmap.OMComponent |
|---|
getPropertyPrefix, setProperties, setPropertyPrefix |
| Methods inherited from class com.bbn.openmap.MapHandlerChild |
|---|
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, 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 InformationDelegator infoDelegator
public static final java.lang.String CoordFormatterProperty
protected CoordInfoFormatter coordFormatter
protected CoordInfoFormatterHandler coordFormatterHandler
| Constructor Detail |
|---|
public CoordMouseMode()
public CoordMouseMode(java.lang.String modeID,
boolean shouldConsumeEvents)
modeID - the id for the mouse mode.shouldConsumeEvents - the mode setting, where the mousemode should
pass the events on to other listeners or not, depending if one of
the listeners used it or not.| Method Detail |
|---|
public void setInfoDelegator(InformationDelegator id)
id - the information delegator that displays the distance values.public InformationDelegator getInfoDelegator()
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractMouseModee - MouseEvent to be handledpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class AbstractMouseModee - mouse event.public void setActive(boolean active)
setActive in interface MapMouseModesetActive in class AbstractMouseModeactive - true if the mode has been made active, false if it has been
made inactive.public void fireMouseLocation(java.awt.event.MouseEvent e)
public void findAndInit(java.lang.Object someObj)
findAndInit in interface LightMapHandlerChildfindAndInit in class MapHandlerChildsomeObj - an object being added to the BeanContext.public void findAndUndo(java.lang.Object someObj)
findAndUndo in interface LightMapHandlerChildfindAndUndo in class MapHandlerChildsomeObj - an object being removed from the BeanContext.
public void setProperties(java.lang.String prefix,
java.util.Properties props)
OMComponent
setProperties in interface PropertyConsumersetProperties in class AbstractMouseModeprefix - the token to prefix the property namesprops - the Properties objectpublic java.util.Properties getProperties(java.util.Properties props)
OMComponent
getProperties in interface PropertyConsumergetProperties in class AbstractMouseModeprops - 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 PropertyConsumergetPropertyInfo in class AbstractMouseModeprops - a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
public CoordInfoFormatter getCoordFormatter()
public void setCoordFormatter(CoordInfoFormatter coordFormatter)
public CoordInfoFormatterHandler getCoordFormatterHandler()
public void setCoordFormatterHandler(CoordInfoFormatterHandler coordFormatterHandler)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||