Package com.ardor3d.input
Interface MouseManager
- All Known Implementing Classes:
AwtMouseManager
,JoglNewtMouseManager
,SwtMouseManager
public interface MouseManager
Defines the contract for managing the native mouse.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates to clients whether or not it is safe to call thesetGrabbed(GrabbedState)
method.boolean
Indicates to clients whether or not it is safe to call thesetPosition(int, int)
method.void
setCursor
(MouseCursor cursor) Change the mouse cursor presently used.void
setGrabbed
(GrabbedState grabbedState) Optional method for changing the mouse to behave as if it is grabbed or not.void
setPosition
(int x, int y) Optional method for changing the mouse cursor position to the specified coordinates.
-
Method Details
-
setCursor
Change the mouse cursor presently used. This is a mandatory operation that all implementing classes must support.- Parameters:
cursor
- the cursor to use
-
setPosition
void setPosition(int x, int y) Optional method for changing the mouse cursor position to the specified coordinates. A client can confirm whether or not this method is support by callingisSetPositionSupported()
.- Parameters:
x
- x position within the current canvas, 0 = lefty
- y position within the current canvas, 0 = bottom
-
setGrabbed
Optional method for changing the mouse to behave as if it is grabbed or not. A client can confirm whether or not this method is support by callingisSetGrabbedSupported()
.- Parameters:
grabbedState
- the value determines which grabbed state is selected
-
getGrabbed
GrabbedState getGrabbed()- Returns:
- current grabbed state of the mouse.
-
isSetPositionSupported
boolean isSetPositionSupported()Indicates to clients whether or not it is safe to call thesetPosition(int, int)
method. Note that if this method returns false, a runtime exception may be thrown by thesetPosition(int, int)
method.- Returns:
- true if the mouse's position can be changed by this implementation, false otherwise.
-
isSetGrabbedSupported
boolean isSetGrabbedSupported()Indicates to clients whether or not it is safe to call thesetGrabbed(GrabbedState)
method. Note that if this method returns false, a runtime exception may be thrown by thesetGrabbed(GrabbedState)
method.- Returns:
- true if the mouse's grabbed state can be changed by this implementation, false otherwise.
-