Package com.jgcomptech.tools.events
Class ActionEvent
- java.lang.Object
-
- com.jgcomptech.tools.events.Event
-
- com.jgcomptech.tools.events.ActionEvent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class ActionEvent extends Event
AnEvent
representing some type of action.- Since:
- 1.4.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static EventType<ActionEvent>
ACTION
The only valid EventType for the ActionEvent.static EventType<ActionEvent>
ANY
Common supertype for all action event types.
-
Constructor Summary
Constructors Constructor Description ActionEvent(EventTarget<? extends ActionEvent> target)
Construct a newActionEvent
with the specified event target.ActionEvent(EventTarget<? extends ActionEvent> target, EventType<? extends Event> eventType)
Construct a newActionEvent
with the specified event target and type.ActionEvent(EventTarget<? extends ActionEvent> target, EventType<? extends Event> eventType, java.util.List<java.lang.Object> args)
Construct a newActionEvent
with the specified event target, type and args.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionEvent
copyFor(java.lang.Object newSource, EventTarget<? extends Event> 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.
-
-
-
Field Detail
-
ACTION
public static final EventType<ActionEvent> ACTION
The only valid EventType for the ActionEvent.
-
ANY
public static final EventType<ActionEvent> ANY
Common supertype for all action event types.
-
-
Constructor Detail
-
ActionEvent
public ActionEvent(EventTarget<? extends ActionEvent> target)
Construct a newActionEvent
with the specified event target. All ActionEvents have their type set toACTION
.- Parameters:
target
- the event target to associate with the event
-
ActionEvent
public ActionEvent(EventTarget<? extends ActionEvent> target, EventType<? extends Event> eventType)
Construct a newActionEvent
with the specified event target and type. All ActionEvents have their type set toACTION
.- Parameters:
target
- the event target to associate with the eventeventType
- the event type
-
ActionEvent
public ActionEvent(EventTarget<? extends ActionEvent> target, EventType<? extends Event> eventType, java.util.List<java.lang.Object> args)
Construct a newActionEvent
with the specified event target, type and args. All ActionEvents have their type set toACTION
.- Parameters:
target
- the event target to associate with the eventeventType
- the event typeargs
- arguments to make available to the EventHandler
-
-
Method Detail
-
getEventType
public EventType<? extends ActionEvent> getEventType()
Description copied from class:Event
Gets the event type of this event. Objects of the sameEvent
class can have different event types. These event types further specify what kind of event occurred.- Overrides:
getEventType
in classEvent
- Returns:
- the event type
-
copyFor
public ActionEvent copyFor(java.lang.Object newSource, EventTarget<? extends Event> newTarget)
Description copied from class:Event
Creates and returns a copy of this event with the specified event source and target.
-
-