Enum Class Dialog.ModalityType

java.lang.Object
java.lang.Enum<Dialog.ModalityType>
vaadinx.awt.Dialog.ModalityType
All Implemented Interfaces:
Serializable, Comparable<Dialog.ModalityType>, Constable
Enclosing class:
Dialog

public static enum Dialog.ModalityType extends Enum<Dialog.ModalityType>
AWT's modality type — controls which other windows the modal Dialog blocks. Mirrors Dialog.ModalityType verbatim; import-swap from java.awt.Dialog.ModalityType to Dialog.ModalityType works because the constant names line up.

Behavioural mapping under R_vaadin_first: all non-MODELESS types collapse to a single Vaadin Dialog.modal=true, since Vaadin's overlay only supports a binary modal flag. The type is stored verbatim for round-trip (Dialog.getModalityType() reads back what was set), but the actual blocking behaviour is the same for APPLICATION_MODAL / DOCUMENT_MODAL / TOOLKIT_MODAL: the dialog overlay traps focus until closed. TOOLKIT_MODAL's "block every other top-level window in this Java toolkit" can't be honored — there's only one Vaadin UI per tab — but for a single-UI app the observable difference vs. APPLICATION_MODAL is nil.

  • Enum Constant Details

    • MODELESS

      public static final Dialog.ModalityType MODELESS
      Non-modal: dialog doesn't block any other windows.
    • DOCUMENT_MODAL

      public static final Dialog.ModalityType DOCUMENT_MODAL
      Modal w.r.t. the document subtree the dialog belongs to.
    • APPLICATION_MODAL

      public static final Dialog.ModalityType APPLICATION_MODAL
      Modal w.r.t. the entire application (same VM).
    • TOOLKIT_MODAL

      public static final Dialog.ModalityType TOOLKIT_MODAL
      Modal w.r.t. all top-level windows in the Java toolkit.
  • Method Details

    • values

      public static Dialog.ModalityType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Dialog.ModalityType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null