Event

processing.event

## Class Event

- Object
- - Event

- Direct Known Subclasses:
    KeyEvent, MouseEvent, TouchEvent

      public class Event
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ALT`
    `static int` | `CTRL`
    `static int` | `KEY`
    `static int` | `META`
    `static int` | `MOUSE`
    `static int` | `SHIFT`
    `static int` | `TOUCH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Event(Object nativeObject, long millis, int action, int modifiers)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAction()`
    `int` | `getFlavor()`
    `long` | `getMillis()`
    `int` | `getModifiers()`
    `Object` | `getNative()` Get the platform-native event object.
    `boolean` | `isAltDown()`
    `boolean` | `isControlDown()`
    `boolean` | `isMetaDown()`
    `boolean` | `isShiftDown()`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SHIFT

          public static final int SHIFT

      See Also:
        Constant Field Values

    - #### CTRL

          public static final int CTRL

      See Also:
        Constant Field Values

    - #### META

          public static final int META

      See Also:
        Constant Field Values

    - #### ALT

          public static final int ALT

      See Also:
        Constant Field Values

    - #### KEY

          public static final int KEY

      See Also:
        Constant Field Values

    - #### MOUSE

          public static final int MOUSE

      See Also:
        Constant Field Values

    - #### TOUCH

          public static final int TOUCH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Event

          public Event(Object nativeObject,
               long millis,
               int action,
               int modifiers)

  - ### Method Detail

    - #### getFlavor

          public int getFlavor()

    - #### getNative

          public Object getNative()

      Get the platform-native event object. This might be the java.awt event on the desktop, though if you're using OpenGL on the desktop it'll be a NEWT event that JOGL uses. Android events are something else altogether. Bottom line, use this only if you know what you're doing, and don't make assumptions about the class type.

    - #### getMillis

          public long getMillis()

    - #### getAction

          public int getAction()

    - #### getModifiers

          public int getModifiers()

    - #### isShiftDown

          public boolean isShiftDown()

    - #### isControlDown

          public boolean isControlDown()

    - #### isMetaDown

          public boolean isMetaDown()

    - #### isAltDown

          public boolean isAltDown()