public class ActionEvent extends Event
Event representing some type of action. This event type is widely
used to represent a variety of things, such as when a Button
has been fired, when a KeyFrame has finished, and other
such usages.| Modifier and Type | Field and Description |
|---|---|
static EventType<ActionEvent> |
ACTION
The only valid EventType for the ActionEvent.
|
static EventType<ActionEvent> |
ANY
Common supertype for all action event types.
|
consumed, eventType, NULL_SOURCE_TARGET, targetsource| Constructor and Description |
|---|
ActionEvent()
Creates a new
ActionEvent with an event type of ACTION. |
ActionEvent(Object source,
EventTarget target)
Construct a new
ActionEvent with the specified event source and target. |
| Modifier and Type | Method and Description |
|---|---|
ActionEvent |
copyFor(Object newSource,
EventTarget newTarget)
Creates and returns a copy of this event with the specified event source
and target.
|
EventType<? extends ActionEvent> |
getEventType()
Gets the event type of this event.
|
getSource, toStringpublic static final EventType<ActionEvent> ACTION
public static final EventType<ActionEvent> ANY
public ActionEvent()
ActionEvent with an event type of ACTION.
The source and target of the event is set to NULL_SOURCE_TARGET.public ActionEvent(Object source, EventTarget target)
ActionEvent with the specified event source and target.
If the source or target is set to null, it is replaced by the
NULL_SOURCE_TARGET value. All ActionEvents have their type set to
ACTION.source - the event source which sent the eventtarget - the event target to associate with the eventpublic ActionEvent copyFor(Object newSource, EventTarget newTarget)
Eventnull, it is
replaced by the NULL_SOURCE_TARGET value.public EventType<? extends ActionEvent> getEventType()
EventEvent
class can have different event types. These event types further specify
what kind of event occurred.getEventType in class EventCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.