com.bbn.openmap.event
Class SelectMouseMode

java.lang.Object
  extended by com.bbn.openmap.MapHandlerChild
      extended by com.bbn.openmap.OMComponent
          extended by com.bbn.openmap.event.AbstractMouseMode
              extended by com.bbn.openmap.event.CoordMouseMode
                  extended by com.bbn.openmap.event.SelectMouseMode
All Implemented Interfaces:
MapMouseMode, PaintListener, LightMapHandlerChild, PropertyConsumer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
TimeSliderPanel.TimeSliderMouseMode

public class SelectMouseMode
extends CoordMouseMode

The SelectMouseMode delegates handling of mouse events to the listeners. This MouseMode type is ideal for Layers that want to receive MouseEvents. The simplest way to set this up is for the Layer to implement the MapMouseListener interface, and indicate that it wants to receive events when the mouse mode is the SelectMouseMode. Here's a code snippet for a Layer that would do this:

 public MapMouseListener getMapMouseListener() {
     return this;
 }
 
 public String[] getMouseModeServiceList() {
     return new String[] { SelectMouseMode.modeID };
 }
 

This class is functionally the same as the AbstractMouseMode, except that it actually calls the fire methods in the MapMouseSupport object to propagate the events.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bbn.openmap.event.AbstractMouseMode
AbstractMouseMode.MouseWheelTimerListener
 
Field Summary
static java.lang.String modeID
          Mouse Mode identifier, which is "Gestures".
 
Fields inherited from class com.bbn.openmap.event.CoordMouseMode
coordFormatter, coordFormatterHandler, CoordFormatterProperty, infoDelegator
 
Fields inherited from class com.bbn.openmap.event.AbstractMouseMode
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
 
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
SelectMouseMode()
          Construct a SelectMouseMode.
SelectMouseMode(boolean consumeEvents)
          Construct a SelectMouseMode.
SelectMouseMode(java.lang.String id, boolean consumeEvents)
          Construct a SelectMouseMode.
 
Method Summary
 
Methods inherited from class com.bbn.openmap.event.CoordMouseMode
findAndInit, findAndUndo, fireMouseLocation, getCoordFormatter, getCoordFormatterHandler, getInfoDelegator, getProperties, getPropertyInfo, mouseDragged, mouseMoved, propertyChange, setActive, setCoordFormatter, setCoordFormatterHandler, setInfoDelegator, setProperties
 
Methods inherited from class com.bbn.openmap.event.AbstractMouseMode
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
 
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

modeID

public static final transient java.lang.String modeID
Mouse Mode identifier, which is "Gestures". This is returned on getID()

See Also:
Constant Field Values
Constructor Detail

SelectMouseMode

public SelectMouseMode()
Construct a SelectMouseMode. Default constructor. Sets the ID to the modeID, and the consume mode to true.


SelectMouseMode

public SelectMouseMode(boolean consumeEvents)
Construct a SelectMouseMode. The constructor that lets you set the consume mode.

Parameters:
consumeEvents - the consume mode setting.

SelectMouseMode

public SelectMouseMode(java.lang.String id,
                       boolean consumeEvents)
Construct a SelectMouseMode. The constructor that lets you set the consume mode.

Parameters:
id - the id for the mouse mode.
consumeEvents - the consume mode setting.


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details