|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.Mouse
public final class Mouse
Class representing the system mouse.
Nested Class Summary | |
---|---|
static class |
Mouse.Button
Enumeration representing mouse buttons. |
static class |
Mouse.ScrollType
Enumeration defining supported scroll types. |
Constructor Summary | |
---|---|
Mouse()
|
Method Summary | |
---|---|
static void |
capture(Component capturerArgument)
"Captures" the mouse, causing all mouse input to be delegated to the given component rather than propagating down the component hierarchy. |
static int |
getButtonCount()
Returns the number of mouse buttons. |
static int |
getButtons()
Returns a bitfield representing the mouse buttons that are currently pressed. |
static Component |
getCapturer()
Returns the mouse capturer. |
static Cursor |
getCursor()
Returns the current cursor. |
static boolean |
isPressed(Mouse.Button button)
Tests the pressed state of a button. |
static void |
release()
Releases mouse capture, causing mouse input to resume propagation down the component hierarchy. |
protected static void |
setButtons(int buttons)
|
static void |
setCursor(Component component)
Sets the cursor based on a given component. |
static void |
setCursor(Cursor cursor)
Sets the cursor to an explicit value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mouse()
Method Detail |
---|
public static int getButtons()
protected static void setButtons(int buttons)
public static boolean isPressed(Mouse.Button button)
button
-
public static int getButtonCount()
public static void capture(Component capturerArgument)
capturerArgument
- The component that wants to capture the mouse. The mouse pointer must
currently be over the component.public static void release()
public static Component getCapturer()
public static Cursor getCursor()
IllegalStateException
- If the mouse is not currently captured.public static void setCursor(Cursor cursor)
cursor
-
IllegalStateException
- If the mouse is not currently captured.public static void setCursor(Component component)
component
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |