Top Description Fields Constructors Methods
javafx.event

public Class ActionEvent

extends Event
Class Inheritance

An Event representing some type of action. This event type is widely used to represent a variety of things, such as when a javafx.scene.control.Button has been fired, when a javafx.animation.KeyFrame has finished, and other such usages.
Since
JavaFX 2.0

Field Summary

Modifier and TypeField and Description
public static final EventType<ActionEvent>
ACTION

The only valid EventType for the ActionEvent.

public static final EventType<ActionEvent>
ANY

Hides javafx.event.Event.ANY.

Common supertype for all action event types.
private static final long
Inherited from javafx.event.Event:
consumedeventTypeNULL_SOURCE_TARGETtarget

Constructor Summary

AccessConstructor and Description
public
ActionEvent()

Creates a new ActionEvent with an event type of ACTION.

public
ActionEvent(Object
the event source which sent the event
source
,
EventTarget
the event target to associate with the event
target
)

Construct a new ActionEvent with the specified event source and target.

Method Summary

Modifier and TypeMethod and Description
public ActionEvent
copyFor(Object newSource, EventTarget newTarget)

Overrides javafx.event.Event.copyFor.

Creates and returns a copy of this event with the specified event source and target.

public EventType<? extends ActionEvent>
getEventType()

Overrides javafx.event.Event.getEventType.

Gets the event type of this event.

Inherited from javafx.event.Event:
cloneconsumefireEventgetTargetisConsumed

Field Detail

ACTIONback to summary
public static final EventType<ActionEvent> ACTION

The only valid EventType for the ActionEvent.

ANYback to summary
public static final EventType<ActionEvent> ANY

Hides javafx.event.Event.ANY.

Common supertype for all action event types.

Since
JavaFX 8.0
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javafx.event.Event.serialVersionUID.

Constructor Detail

ActionEventback to summary
public ActionEvent()

Creates a new ActionEvent with an event type of ACTION. The source and target of the event is set to NULL_SOURCE_TARGET.

ActionEventback to summary
public ActionEvent(Object source, EventTarget target)

Construct a new 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.

Parameters
source:Object

the event source which sent the event

target:EventTarget

the event target to associate with the event

Method Detail

copyForback to summary
public ActionEvent copyFor(Object newSource, EventTarget newTarget)

Overrides javafx.event.Event.copyFor.

Doc from javafx.event.Event.copyFor.

Creates and returns a copy of this event 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.

Annotations
@Override
getEventTypeback to summary
public EventType<? extends ActionEvent> getEventType()

Overrides javafx.event.Event.getEventType.

Doc from javafx.event.Event.getEventType.

Gets the event type of this event. Objects of the same Event class can have different event types. These event types further specify what kind of event occurred.

Annotations
@Override