public abstract class CoordMouseMode extends AbstractMouseMode implements java.beans.PropertyChangeListener
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.
AbstractMouseMode.MouseWheelTimerListener
Modifier and Type | Field and Description |
---|---|
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
|
cursor, CursorIDProperty, guiIcon, iconName, IconProperty, ID, IDProperty, logger, mouseSupport, mouseTimer, mouseWheelListener, MouseWheelListenerProperty, mouseWheelTimerInterval, MouseWheelTimerIntervalProperty, mouseWheelTimerListener, MouseWheelZoomProperty, noMouseWheelListenerTimer, NoMouseWheelListenerTimerProperty, prettyName, PrettyNameProperty, propertyChangeSupport, visible, ZOOM_IN, ZOOM_OUT, zoomWhenMouseWheelUp
i18n, propertyPrefix
beanContextChildSupport, isolated
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
Constructor and Description |
---|
CoordMouseMode() |
CoordMouseMode(java.lang.String modeID,
boolean shouldConsumeEvents) |
Modifier and Type | Method and Description |
---|---|
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.
|
actAsProxyFor, actAsProxyFor, addMapMouseListener, addPropertyChangeListener, getClassToUseForIconRetrieval, getGUIIcon, getIconName, getID, getModeCursor, getMouseSupport, getMouseWheelTimerInterval, getNoMouseWheelListener, getPrettyName, getProxied, getProxyDistributionMask, isConsumeEvents, isMouseWheelListener, isNoMouseWheelListenerTimer, isProxyFor, isVisible, isZoomWhenMouseWheelUp, listenerPaint, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, mouseWheelMoved, releaseProxy, removeAllMapMouseListeners, removeMapMouseListener, removePropertyChangeListener, setConsumeEvents, setGUIIcon, setIconName, setID, setModeCursor, setModeCursor, setMouseSupport, setMouseWheelListener, setMouseWheelTimerInterval, setNoMouseWheelListener, setNoMouseWheelListenerTimer, setPrettyName, setProxyDistributionMask, setVisible, setZoomWhenMouseWheelUp, updateMouseWheelMoved
getPropertyPrefix, setProperties, setPropertyPrefix
addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, firePropertyChange, fireVetoableChange, getBeanContext, isIsolated, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext, setIsolated
public InformationDelegator infoDelegator
public static final java.lang.String CoordFormatterProperty
protected CoordInfoFormatter coordFormatter
protected CoordInfoFormatterHandler coordFormatterHandler
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.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.MouseMotionListener
mouseMoved
in class AbstractMouseMode
e
- MouseEvent to be handledpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class AbstractMouseMode
e
- mouse event.public void setActive(boolean active)
setActive
in interface MapMouseMode
setActive
in class AbstractMouseMode
active
- 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 LightMapHandlerChild
findAndInit
in class MapHandlerChild
someObj
- an object being added to the BeanContext.public void findAndUndo(java.lang.Object someObj)
findAndUndo
in interface LightMapHandlerChild
findAndUndo
in class MapHandlerChild
someObj
- an object being removed from the BeanContext.public void setProperties(java.lang.String prefix, java.util.Properties props)
OMComponent
setProperties
in interface PropertyConsumer
setProperties
in class AbstractMouseMode
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 AbstractMouseMode
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 AbstractMouseMode
props
- 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
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details