org.opengis.go.display.event
Interface MouseManager

All Superinterfaces:
EventManager

public interface MouseManager
extends EventManager

Defines a common abstraction for classes that handle mouse events. It prescribes a stack mechanism for managing MouseHandlers.


Method Summary
 void enableMouseHandler(MouseHandler mouseHandler)
          The window will pass mouse events to only this MouseHandler, until the MouseHandler is changed or removed.
 MouseHandler getCurrentMouseHandler()
          Returns the current MouseHandler or null if none.
 MouseHandler[] getFallbackMouseHandlers()
          Returns an array of additional MouseHandlers to call for a given MouseEvent, if the current mouse handler doesn't handle it.
 void pushMouseHandler(MouseHandler mouseHandler)
          Enable the given MouseHandler, and push it on the stack so that if another MouseHandler gets enabled, this one will be reenabled when that MouseHandler is removed.
 void removeMouseHandler(MouseHandler mouseHandler)
          Remove the given MouseHandler and reinstate the MouseHandler at the top of the stack, if any.
 boolean replaceMouseHandler(MouseHandler existingHandler, MouseHandler replacementHandler)
          Replace a MouseHandler in the stack with another MouseHandler.
 

Method Detail

enableMouseHandler

void enableMouseHandler(MouseHandler mouseHandler)
The window will pass mouse events to only this MouseHandler, until the MouseHandler is changed or removed.

Parameters:
mouseHandler - the current mouse handler.

pushMouseHandler

void pushMouseHandler(MouseHandler mouseHandler)
Enable the given MouseHandler, and push it on the stack so that if another MouseHandler gets enabled, this one will be reenabled when that MouseHandler is removed.

Parameters:
mouseHandler - The MouseHandler to enable and push.
See Also:
enableMouseHandler(org.opengis.go.display.event.MouseHandler)

removeMouseHandler

void removeMouseHandler(MouseHandler mouseHandler)
Remove the given MouseHandler and reinstate the MouseHandler at the top of the stack, if any.

Parameters:
mouseHandler - the MouseHandler to disable and remove.

replaceMouseHandler

boolean replaceMouseHandler(MouseHandler existingHandler,
                            MouseHandler replacementHandler)
Replace a MouseHandler in the stack with another MouseHandler.

Parameters:
existingHandler - the MouseHandler to be replaced.
replacementHandler - the MouseHandler that is replacing the existingHandler.
Returns:
true if existingHandler was found and replaced by replacementHandler.

getCurrentMouseHandler

MouseHandler getCurrentMouseHandler()
Returns the current MouseHandler or null if none.

Returns:
the current MouseHandler or null if none.

getFallbackMouseHandlers

MouseHandler[] getFallbackMouseHandlers()
Returns an array of additional MouseHandlers to call for a given MouseEvent, if the current mouse handler doesn't handle it. These handlers will be called in ascending index order until the MouseEvent is consumed.

Returns:
the array of additional MouseHandlers.


Copyright © 1994-2008 Open Geospatial Consortium. All Rights Reserved.