public class Touch2DEvent extends InputEvent implements IEventArgs
Touch2DEvent
types.Modifier and Type | Field and Description |
---|---|
static EventType<Touch2DEvent> |
ANY
Any Touch2DEvent.
|
static EventType<Touch2DEvent> |
DOWN
A touch point went down.
|
static EventType<Touch2DEvent> |
ENTERED
A touch point has entered the control's bounds.
|
static EventType<Touch2DEvent> |
EXITED
A touch point has exited the control's bounds.
|
static EventType<Touch2DEvent> |
LONG_PRESS
A long press has been recognized.
|
static EventType<Touch2DEvent> |
LOST_CAPTURE
Touch capture has been lost while the device was down.
|
static EventType<Touch2DEvent> |
MOVED
A pointer has been moved.
|
static EventType<Touch2DEvent> |
NONE
Not a touch event.
|
static EventType<Touch2DEvent> |
TAPPED
A touch tap has been recognized.
|
static EventType<Touch2DEvent> |
UP
A touch point went up.
|
consumed, eventType, NULL_SOURCE_TARGET, target
source
EMPTY
Constructor and Description |
---|
Touch2DEvent(Object source,
EventType<Touch2DEvent> eventType,
PointD location,
Touch2DPoint touchPoint,
ModifierKeys changedModifiers,
ModifierKeys modifiers)
Constructs a new Touch2DEvent argument.
|
Touch2DEvent(Object source,
EventType<Touch2DEvent> eventType,
PointD location,
Touch2DPoint touchPoint,
ModifierKeys changedModifiers,
ModifierKeys modifiers,
int tapCount)
Constructs a new touch event argument.
|
Modifier and Type | Method and Description |
---|---|
ModifierKeys |
getChangedModifiers()
Returns the modifier keys that have changed for this event.
|
PointD |
getLocation()
Returns the location represented by this event in world coordinates.
|
ModifierKeys |
getModifiers()
The state of the modifier keys at the time of the event creation.
|
int |
getTapCount()
Returns the number of taps the current event represents if it is of type
TAPPED . |
Touch2DPoint |
getTouchPoint()
Returns the touch point associated with this event.
|
String |
toString()
Provides a human readable string representation of this event.
|
getEventType
clone, consume, copyFor, fireEvent, getTarget, isConsumed
getSource
public static final EventType<Touch2DEvent> ANY
public static final EventType<Touch2DEvent> DOWN
public static final EventType<Touch2DEvent> ENTERED
public static final EventType<Touch2DEvent> EXITED
public static final EventType<Touch2DEvent> LONG_PRESS
public static final EventType<Touch2DEvent> LOST_CAPTURE
public static final EventType<Touch2DEvent> MOVED
public static final EventType<Touch2DEvent> NONE
public static final EventType<Touch2DEvent> TAPPED
public static final EventType<Touch2DEvent> UP
public Touch2DEvent(Object source, EventType<Touch2DEvent> eventType, PointD location, Touch2DPoint touchPoint, ModifierKeys changedModifiers, ModifierKeys modifiers)
source
- The source of the eventeventType
- The type of the eventlocation
- The position of the touch point in world coordinates at the time of the eventtouchPoint
- The touch point the event was triggered bychangedModifiers
- the modifier Keys that have been changedmodifiers
- the current state of the modifier Keyspublic Touch2DEvent(Object source, EventType<Touch2DEvent> eventType, PointD location, Touch2DPoint touchPoint, ModifierKeys changedModifiers, ModifierKeys modifiers, int tapCount)
eventType
- The type of the eventlocation
- The position of the touch device in world coordinates at the time of the eventtouchPoint
- The device the event was triggered bychangedModifiers
- the modifier Keys that have been changedmodifiers
- the current state of the modifier KeystapCount
- the number of taps this event represents, 2 for a double tappublic final ModifierKeys getChangedModifiers()
getModifiers()
public final PointD getLocation()
public final ModifierKeys getModifiers()
public final int getTapCount()
TAPPED
.public final Touch2DPoint getTouchPoint()
public String toString()
toString
in class EventObject