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

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.
`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.
`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` | `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

    public java.lang.String getID()

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

  Returns:
    String ID

### getPrettyName

    public java.lang.String getPrettyName()

  Return a pretty name, suitable for the GUI.

### getModeCursor

    public 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

    public javax.swing.Icon getGUIIcon()

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

### addMapMouseListener

    public void addMapMouseListener(MapMouseListener l)

  Add a MapMouseListener to the MouseMode.

  Parameters:
    `l` - the MapMouseListener to add.

### removeMapMouseListener

    public void removeMapMouseListener(MapMouseListener l)

  Remove a MapMouseListener from the MouseMode.

  Parameters:
    `l` - the MapMouseListener to remove.

### removeAllMapMouseListeners

    public void removeAllMapMouseListeners()

  Remove all MapMouseListeners from the mode.

### setActive

    public 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

    public 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

    public 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 forwared 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

    public 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

    public boolean isProxyFor(MapMouseMode mmm)

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

### releaseProxy

    public void releaseProxy()

  Release the proxy lock on the MapMouseMode.

### setProxyDistributionMask

    public 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

    public 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.`

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