Package org.eclipse.draw2d

# Class InputEvent

java.lang.Object
java.util.EventObject
org.eclipse.draw2d.InputEvent

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `KeyEvent`, `MouseEvent`

public abstract class InputEvent extends EventObject
The base class for Draw2d events.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ALT`
Deprecated.
Use `SWT.ALT` instead.
`static final int`
`ANY_BUTTON`
Deprecated.
Use `SWT.BUTTON_MASK` instead.
`static final int`
`BUTTON1`
Deprecated.
Use `SWT.BUTTON1` instead.
`static final int`
`BUTTON2`
Deprecated.
Use `SWT.BUTTON2` instead.
`static final int`
`BUTTON3`
Deprecated.
Use `SWT.BUTTON3` instead.
`static final int`
`BUTTON4`
Deprecated.
Use `SWT.BUTTON4` instead.
`static final int`
`BUTTON5`
Deprecated.
Use `SWT.BUTTON5` instead.
`static final int`
`CONTROL`
Deprecated.
Use `SWT.CONTROL` instead.
`static final int`
`SHIFT`
Deprecated.
Use `SWT.SHIFT` instead.

### Fields inherited from class java.util.EventObject

`source`

## Constructor Summary

Constructors
Constructor
Description
`InputEvent(EventDispatcher dispatcher, IFigure source, int state)`
Constructs a new InputEvent.

## Method Summary

Modifier and Type
Method
Description
`void`
`consume()`
Marks this event as consumed so that it doesn't get passed on to other listeners.
`int`
`getState()`
Returns the event state mask, which is a bitwise OR'ing of the keyboard modifier and the mouse button mask.
`boolean`
`isConsumed()`

### Methods inherited from class java.util.EventObject

`getSource, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### ALT

public static final int ALT
Deprecated.
Use `SWT.ALT` instead.

See Also:
  - Constant Field Values

### CONTROL

public static final int CONTROL
Deprecated.
Use `SWT.CONTROL` instead.

See Also:
  - Constant Field Values

### SHIFT

public static final int SHIFT
Deprecated.
Use `SWT.SHIFT` instead.

See Also:
  - Constant Field Values

### BUTTON1

public static final int BUTTON1
Deprecated.
Use `SWT.BUTTON1` instead.

See Also:
  - Constant Field Values

### BUTTON2

public static final int BUTTON2
Deprecated.
Use `SWT.BUTTON2` instead.

See Also:
  - Constant Field Values

### BUTTON3

public static final int BUTTON3
Deprecated.
Use `SWT.BUTTON3` instead.

See Also:
  - Constant Field Values

### BUTTON4

public static final int BUTTON4
Deprecated.
Use `SWT.BUTTON4` instead.

See Also:
  - Constant Field Values

### BUTTON5

public static final int BUTTON5
Deprecated.
Use `SWT.BUTTON5` instead.

See Also:
  - Constant Field Values

### ANY_BUTTON

public static final int ANY_BUTTON
Deprecated.
Use `SWT.BUTTON_MASK` instead.
A bitwise OR'ing of `BUTTON1`, `BUTTON2`, `BUTTON3`, `BUTTON4` and `BUTTON5`

## Constructor Details

### InputEvent

public InputEvent(EventDispatcher dispatcher, IFigure source, int state)
Constructs a new InputEvent.

Parameters:
  `dispatcher` - the event dispatcher
  `source` - the source of the event
  `state` - the state of the keyboard modifier and mouse button mask.
See Also:
  - `SWT.MODIFIER_MASK`
  - `SWT.BUTTON_MASK`

## Method Details

### consume

public void consume()
Marks this event as consumed so that it doesn't get passed on to other listeners.

### getState

public int getState()
Returns the event state mask, which is a bitwise OR'ing of the keyboard modifier and the mouse button mask.

Returns:
  the state
See Also:
  - `SWT.MODIFIER_MASK`
  - `SWT.BUTTON_MASK`

### isConsumed

public boolean isConsumed()

Returns:
  whether this event has been consumed.