Package cl.obcom.desktopfx.core
Class ModalEvent
java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.ModalEvent
- All Implemented Interfaces:
Serializable
,Cloneable
The root event class for all Modal events.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EventType
<ModalEvent> Common supertype for allModalEvent
events.static final EventType
<ModalEvent> This event occurs just after a modal task has terminated with a result.Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionModalEvent
(Object result) Creates a newModalEvent
with an event type ofTERMINATED
. -
Method Summary
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
TERMINATED
This event occurs just after a modal task has terminated with a result. -
ANY
Common supertype for allModalEvent
events.
-
-
Constructor Details
-
ModalEvent
Creates a newModalEvent
with 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
null
if none available. - Throws:
NullPointerException
- iftype
isnull
.ClassCastException
- if result is not an instance oftype
.
-