de.matthiasmann.twl
Enum Event.Type

java.lang.Object
  extended by java.lang.Enum<Event.Type>
      extended by de.matthiasmann.twl.Event.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Event.Type>
Enclosing class:
Event

public static enum Event.Type
extends java.lang.Enum<Event.Type>


Enum Constant Summary
CLEAR_KEYBOARD_STATE
          Send when GUI.clearKeyboardState() is called.
KEY_PRESSED
          A key has been pressed.
KEY_RELEASED
          A key has been released.
MOUSE_BTNDOWN
          A mouse button has been pressed.
MOUSE_BTNUP
          A mouse button has been released.
MOUSE_CLICKED
          A click event with the left mouse button.
MOUSE_DRAGGED
          The mouse has moved while at least one mouse button was pressed.
MOUSE_ENTERED
          The mouse has entered the widget.
MOUSE_EXITED
          The mouse has left the widget.
MOUSE_MOVED
          The mouse has moved over the widget - no mouse buttons are pressed.
MOUSE_WHEEL
          The mouse wheel has been turned.
POPUP_CLOSED
          A popup has closed.
POPUP_OPENED
          A popup has been opened.
 
Method Summary
static Event.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Event.Type[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MOUSE_ENTERED

public static final Event.Type MOUSE_ENTERED
The mouse has entered the widget. You need to return true from Widget.handleEvent(de.matthiasmann.twl.Event) in order to receive further mouse events.


MOUSE_MOVED

public static final Event.Type MOUSE_MOVED
The mouse has moved over the widget - no mouse buttons are pressed. You need to return true from Widget.handleEvent(de.matthiasmann.twl.Event) in order to receive further mouse events.


MOUSE_BTNDOWN

public static final Event.Type MOUSE_BTNDOWN
A mouse button has been pressed. The pressed button is available via Event.getMouseButton()


MOUSE_BTNUP

public static final Event.Type MOUSE_BTNUP
A mouse button has been released. The released button is available via Event.getMouseButton()


MOUSE_CLICKED

public static final Event.Type MOUSE_CLICKED
A click event with the left mouse button. A click is defined by a MOUSE_BTNDOWN event followed by a MOUSE_BTNUP without moving the mouse outside the click distance. The MOUSE_BTNUP event is sent before the MOUSE_CLICKED.


MOUSE_DRAGGED

public static final Event.Type MOUSE_DRAGGED
The mouse has moved while at least one mouse button was pressed. The widget automatically captures the mouse when a drag is started, which means that the widgets will receive mouse events from this drag also outside of it's bounds. The drag ends when the last mouse button is released.

See Also:
Event.isMouseDragEvent(), Event.isMouseDragEnd()

MOUSE_EXITED

public static final Event.Type MOUSE_EXITED
The mouse has left the widget.


MOUSE_WHEEL

public static final Event.Type MOUSE_WHEEL
The mouse wheel has been turned. The amount is available via Event.getMouseWheelDelta()


KEY_PRESSED

public static final Event.Type KEY_PRESSED
A key has been pressed. Not all keys generate characters.

See Also:
Event.isKeyEvent(), Event.isKeyPressedEvent(), Event.isKeyRepeated(), Event.hasKeyChar(), Event.hasKeyCharNoModifiers()

KEY_RELEASED

public static final Event.Type KEY_RELEASED
A key has been released. No character data is available.

See Also:
Event.isKeyEvent()

POPUP_OPENED

public static final Event.Type POPUP_OPENED
A popup has been opened. Input event delivery will stop until the popup is closed.


POPUP_CLOSED

public static final Event.Type POPUP_CLOSED
A popup has closed. Input events delivery will resume if no other popups are open.


CLEAR_KEYBOARD_STATE

public static final Event.Type CLEAR_KEYBOARD_STATE
Send when GUI.clearKeyboardState() is called. Widgets which remeber KEY_PRESSED events should clear their state.

Method Detail

values

public static final Event.Type[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(Event.Type c : Event.Type.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static Event.Type valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name