MapMouseMode (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.event
Interface MapMouseMode

All Superinterfaces:
  java.util.EventListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, PaintListener

All Known Implementing Classes:
  AbstractMouseMode, CoordMouseMode, DefaultOverviewMouseMode, DistanceMouseMode, DistQuickTool.MouseMode, EditorLayerMouseMode, NavMouseMode, NavMouseMode2, NullMouseMode, OMDrawingToolMouseMode, OMMouseMode, PanMouseMode, RangeRingsMouseMode, SelectMouseMode, TimeSliderPanel.TimeSliderMouseMode, ZoomMouseMode

    public interface MapMouseMode

extends java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, PaintListener

Interface for handling mouse behavior while the mouse is operating over the MapBean. A "MouseMode" object exists to interpret the meaning of mouse events. For instance, you could have a mode where mouse events (click, drag-select) are interpreted as navigation commands, (recenter, zoom-and-recenter). There may be other modes depending on how your application wants to interpret MouseEvents.

See Also:
  `AbstractMouseMode`, `NavMouseMode`, `SelectMouseMode`, `NullMouseMode`

Method Summary
`boolean` | `actAsProxyFor(MapMouseMode mmm)` Request to have the MapMouseMode act as a proxy for a MapMouseMode that wants to remain hidden.
`boolean` | `actAsProxyFor(MapMouseMode mmm, int pdm)` Request to have the MapMouseMode act as a proxy for a MapMouseMode that wants to remain hidden.
`void` | `addMapMouseListener(MapMouseListener l)` Add a MapMouseListener to the MouseMode.
`void` | `addPropertyChangeListener(java.beans.PropertyChangeListener pcl)` The MapMouseMode should send out notifications when a proxy is added or removed.
`javax.swing.Icon` | `getGUIIcon()` Gets the Icon to represent the Mouse Mode in a GUI.
`java.lang.String` | `getID()` Returns the id (MapMouseMode name).
`java.awt.Cursor` | `getModeCursor()` Gets the mouse cursor recommended for use when this mouse mode is active.
`java.lang.String` | `getPrettyName()` Return a pretty name, suitable for the GUI.
`MapMouseMode` | `getProxied()`
`int` | `getProxyDistributionMask()` Get the mask that dictates which events get sent to this support object's targets even if the parent mouse mode is acting as a proxy.
`boolean` | `isProxyFor(MapMouseMode mmm)` Can check if the MapMouseMode is acting as a proxy for a MapMouseMode.
`boolean` | `isVisible()` Lets the MouseDelegator know if the MapMouseMode should be visible in the GUI, in order to create certain mouse modes that may be controlled by other tools.
`void` | `releaseProxy()` Release the proxy lock on the MapMouseMode.
`void` | `removeAllMapMouseListeners()` Remove all MapMouseListeners from the mode.
`void` | `removeMapMouseListener(MapMouseListener l)` Remove a MapMouseListener from the MouseMode.
`void` | `removePropertyChangeListener(java.beans.PropertyChangeListener pcl)`
`void` | `setActive(boolean active)` Let the MapMouseMode know if it is active or not.
`void` | `setProxyDistributionMask(int mask)` Set the mask that dictates which events get sent to this support object's targets even if the parent mouse mode is acting as a proxy.

Methods inherited from interface java.awt.event.MouseListener
`mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased`

Methods inherited from interface java.awt.event.MouseMotionListener
`mouseDragged, mouseMoved`

Methods inherited from interface java.awt.event.MouseWheelListener
`mouseWheelMoved`

Methods inherited from interface com.bbn.openmap.event.PaintListener
`listenerPaint`

Method Detail

### getID

    java.lang.String getID()

  Returns the id (MapMouseMode name). This name should be unique for each MapMouseMode.

  Returns:
    String ID

### getPrettyName

    java.lang.String getPrettyName()

  Return a pretty name, suitable for the GUI.

### getModeCursor

    java.awt.Cursor getModeCursor()

  Gets the mouse cursor recommended for use when this mouse mode is active.

  Returns:
    Cursor the mouse cursor recommended for use when this mouse mode is active.

### getGUIIcon

    javax.swing.Icon getGUIIcon()

  Gets the Icon to represent the Mouse Mode in a GUI.

### addMapMouseListener

    void addMapMouseListener(MapMouseListener l)

  Add a MapMouseListener to the MouseMode.

  Parameters:
    `l` - the MapMouseListener to add.

### removeMapMouseListener

    void removeMapMouseListener(MapMouseListener l)

  Remove a MapMouseListener from the MouseMode.

  Parameters:
    `l` - the MapMouseListener to remove.

### removeAllMapMouseListeners

    void removeAllMapMouseListeners()

  Remove all MapMouseListeners from the mode.

### setActive

    void setActive(boolean active)

  Let the MapMouseMode know if it is active or not. Called by the MouseDelegator.

  Parameters:
    `active` - true if the MapMouseMode has been made the active one, false if it has been set inactive.

### isVisible

    boolean isVisible()

  Lets the MouseDelegator know if the MapMouseMode should be visible in the GUI, in order to create certain mouse modes that may be controlled by other tools.

### actAsProxyFor

    boolean actAsProxyFor(MapMouseMode mmm)

  Request to have the MapMouseMode act as a proxy for a MapMouseMode that wants to remain hidden. Can be useful for directing events to one object. With this call, no events will be forwarded to the proxy's target.

  Parameters:
    `mmm` - the hidden MapMouseMode for this MapMouseMode to send events to.
  Returns:
    true if the proxy setup (essentially a lock) is successful, false if the proxy is already set up for another listener.

### actAsProxyFor

    boolean actAsProxyFor(MapMouseMode mmm,
                          int pdm)

  Request to have the MapMouseMode act as a proxy for a MapMouseMode that wants to remain hidden. Can be useful for directing events to one object.

  Parameters:
    `mmm` - the hidden MapMouseMode for this MapMouseMode to send events to.
    `pdm` - the proxy distribution mask to use, which lets this proxy notify its targets of events.
  Returns:
    true if the proxy setup (essentially a lock) is successful, false if the proxy is already set up for another listener.

### isProxyFor

    boolean isProxyFor(MapMouseMode mmm)

  Can check if the MapMouseMode is acting as a proxy for a MapMouseMode.

### releaseProxy

    void releaseProxy()

  Release the proxy lock on the MapMouseMode.

### getProxied

    MapMouseMode getProxied()

  Returns:
    the mouse mode being proxied.

### setProxyDistributionMask

    void setProxyDistributionMask(int mask)

  Set the mask that dictates which events get sent to this support object's targets even if the parent mouse mode is acting as a proxy.

  See Also:
    `for definitions of mask bits.`

### getProxyDistributionMask

    int getProxyDistributionMask()

  Get the mask that dictates which events get sent to this support object's targets even if the parent mouse mode is acting as a proxy.

  See Also:
    `for definitions of mask bits.`

### addPropertyChangeListener

    void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)

  The MapMouseMode should send out notifications when a proxy is added or removed.

  Parameters:
    `pcl` - listener to notify.

### removePropertyChangeListener

    void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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