|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MinuetoMouseHandler
The MinuetoMouseHanlder is an interface for receiving a mouse event
(motion, click) from a MinuetoWindow and handling it.
In other words, the class that will handle mouse input from MinuetoWindow must extend
this interface. In turn, that class must be registered with
the MinuetoEventQueue.
An event is generated everytime the mouse is clicked or moved.
When the handle method on the MinuetoEventQueue is invoked, that
event is processed and the appropriate method in MinuetoMouseHandler
is invoked.
MinuetoMouse,
MinuetoEventQueue| Method Summary | |
|---|---|
void |
handleMouseMove(int x,
int y)
Invoked when the mouse cursor is moved. |
void |
handleMousePress(int x,
int y,
int button)
Invoked when a mouse button is pressed. |
void |
handleMouseRelease(int x,
int y,
int button)
Invoked when a mouse button is released. |
| Method Detail |
|---|
void handleMousePress(int x,
int y,
int button)
The MinuetoMouse class stores the constants used to identify the
mouse buttons.
x - int denoting the X position of the mouse.y - int denoting the Y position of the mouse.button - int denoting which button was pressed.MinuetoMouse
void handleMouseRelease(int x,
int y,
int button)
The MinuetoMouse class stores the constants used to identify the
mouse buttons.
x - int denoting the X position of the mouse.y - int denoting the Y position of the mouse.button - int denoting which button was released.MinuetoMouse
void handleMouseMove(int x,
int y)
This method is invoked very often when the mouse is moved. To avoid performance impacts, avoid having expensive (slow) code in this method.
x - int denoting the X position of the mouse.y - int denoting the Y position of the mouse.MinuetoMouse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||