Class ModalEvent

java.lang.Object
java.util.EventObject
javafx.event.Event
cl.obcom.desktopfx.core.ModalEvent
All Implemented Interfaces:
Serializable, Cloneable

public class ModalEvent extends Event
The root event class for all Modal events.
See Also:
  • Field Details

    • TERMINATED

      public static final EventType<ModalEvent> TERMINATED
      This event occurs just after a modal task has terminated with a result.
    • ANY

      public static final EventType<ModalEvent> ANY
      Common supertype for all ModalEvent events.
  • Constructor Details

    • ModalEvent

      public ModalEvent(Object result)
      Creates a new ModalEvent with an event type of TERMINATED.
      Parameters:
      result - the result of the event.
  • Method Details

    • getResult

      public final <T> T getResult(Class<T> type)
      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 - if type is null.
      ClassCastException - if result is not an instance of type.