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 managingMouseHandlers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidenableMouseHandler(MouseHandler mouseHandler)The window will pass mouse events to only thisMouseHandler, until theMouseHandleris changed or removed.MouseHandlergetCurrentMouseHandler()Returns the currentMouseHandlerornullif none.MouseHandler[]getFallbackMouseHandlers()Returns an array of additionalMouseHandlers to call for a givenMouseEvent, if the current mouse handler doesn't handle it.voidpushMouseHandler(MouseHandler mouseHandler)Enable the givenMouseHandler, and push it on the stack so that if anotherMouseHandlergets enabled, this one will be reenabled when thatMouseHandleris removed.voidremoveMouseHandler(MouseHandler mouseHandler)Remove the givenMouseHandlerand reinstate theMouseHandlerat the top of the stack, if any.booleanreplaceMouseHandler(MouseHandler existingHandler, MouseHandler replacementHandler)Replace aMouseHandlerin the stack with anotherMouseHandler.
-
-
-
Method Detail
-
enableMouseHandler
void enableMouseHandler(MouseHandler mouseHandler)
The window will pass mouse events to only thisMouseHandler, until theMouseHandleris changed or removed.- Parameters:
mouseHandler- the current mouse handler.
-
pushMouseHandler
void pushMouseHandler(MouseHandler mouseHandler)
Enable the givenMouseHandler, and push it on the stack so that if anotherMouseHandlergets enabled, this one will be reenabled when thatMouseHandleris removed.- Parameters:
mouseHandler- TheMouseHandlerto enable and push.- See Also:
enableMouseHandler(org.opengis.go.display.event.MouseHandler)
-
removeMouseHandler
void removeMouseHandler(MouseHandler mouseHandler)
Remove the givenMouseHandlerand reinstate theMouseHandlerat the top of the stack, if any.- Parameters:
mouseHandler- theMouseHandlerto disable and remove.
-
replaceMouseHandler
boolean replaceMouseHandler(MouseHandler existingHandler, MouseHandler replacementHandler)
Replace aMouseHandlerin the stack with anotherMouseHandler.- Parameters:
existingHandler- theMouseHandlerto be replaced.replacementHandler- theMouseHandlerthat is replacing theexistingHandler.- Returns:
trueifexistingHandlerwas found and replaced byreplacementHandler.
-
getCurrentMouseHandler
MouseHandler getCurrentMouseHandler()
Returns the currentMouseHandlerornullif none.- Returns:
- the current
MouseHandlerornullif none.
-
getFallbackMouseHandlers
MouseHandler[] getFallbackMouseHandlers()
Returns an array of additionalMouseHandlers to call for a givenMouseEvent, if the current mouse handler doesn't handle it. These handlers will be called in ascending index order until theMouseEventis consumed.- Returns:
- the array of additional
MouseHandlers.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG