com.bbn.openmap.event
Class SelectMouseMode

java.lang.Object
  |
  +--com.bbn.openmap.MapHandlerChild
        |
        +--com.bbn.openmap.OMComponent
              |
              +--com.bbn.openmap.event.AbstractMouseMode
                    |
                    +--com.bbn.openmap.event.CoordMouseMode
                          |
                          +--com.bbn.openmap.event.SelectMouseMode
All Implemented Interfaces:
java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, LightMapHandlerChild, MapMouseMode, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, PaintListener, PropertyConsumer, java.io.Serializable

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

Field Summary
static java.lang.String modeID
          Mouse Mode identifier, which is "Gestures".
 
Fields inherited from class com.bbn.openmap.event.CoordMouseMode
infoDelegator
 
Fields inherited from class com.bbn.openmap.event.AbstractMouseMode
cursor, df, guiIcon, ID, IDProperty, mouseSupport, prettyName, PrettyNameProperty, visible
 
Fields inherited from class com.bbn.openmap.OMComponent
i18n, propertyPrefix
 
Fields inherited from class com.bbn.openmap.MapHandlerChild
beanContextChildSupport
 
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.
 
Methods inherited from class com.bbn.openmap.event.CoordMouseMode
createCoordinateInformationLine, findAndInit, findAndUndo, fireMouseLocation, getInfoDelegator, mouseDragged, mouseMoved, setActive, setInfoDelegator
 
Methods inherited from class com.bbn.openmap.event.AbstractMouseMode
actAsProxyFor, actAsProxyFor, addMapMouseListener, getGUIIcon, getID, getModeCursor, getMouseSupport, getPrettyName, getProperties, getPropertyInfo, getProxyDistributionMask, isConsumeEvents, isProxyFor, isVisible, listenerPaint, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, releaseProxy, removeAllMapMouseListeners, removeMapMouseListener, setConsumeEvents, setGUIIcon, setID, setModeCursor, setMouseSupport, setPrettyName, setProperties, setProxyDistributionMask, setVisible
 
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, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
 
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()

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