Class ModalEvent
java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.ModalEvent
- All Implemented Interfaces:
Serializable, Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<ModalEvent> Common supertype for allModalEventevents.static final EventType<ModalEvent> This event occurs just after a modal task has terminated with a result.Fields inherited from class Event
consumed, eventType, NULL_SOURCE_TARGET, targetFields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionModalEvent(Object result) Creates a newModalEventwith an event type ofTERMINATED. -
Method Summary
Methods inherited from class Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedMethods inherited from class EventObject
getSource, toString
-
Field Details
-
TERMINATED
This event occurs just after a modal task has terminated with a result. -
ANY
Common supertype for allModalEventevents.
-
-
Constructor Details
-
ModalEvent
Creates a newModalEventwith an event type ofTERMINATED.- Parameters:
result- the result of the event.
-
-
Method Details
-
getResult
Returns the result object cast to the specified type.- Type Parameters:
T- the required type of the result object.- Parameters:
type- the required class type of the result object.- Returns:
- the typed result object or
nullif none available. - Throws:
NullPointerException- iftypeisnull.ClassCastException- if result is not an instance oftype.
-