Enum DialogFooter.EscapeKeyBehavior

    • Enum Constant Detail

      • DOES_NOTHING

        public static final DialogFooter.EscapeKeyBehavior DOES_NOTHING
        This (the default behavior) does nothing when the escape key is pressed.
      • TRIGGERS_CANCEL

        public static final DialogFooter.EscapeKeyBehavior TRIGGERS_CANCEL
        This triggers the cancel button when the escape key is pressed. If no cancel button is present: this does nothing. (Also on Macs command+period acts the same as the escape key.)

        This should only be used if the cancel button does not lead to data loss, because users may quickly press the escape key before reading the text in a dialog.

      • TRIGGERS_DEFAULT

        public static final DialogFooter.EscapeKeyBehavior TRIGGERS_DEFAULT
        This triggers the default button when the escape key is pressed. If no default button is defined: this does nothing. (Also on Macs command+period acts the same as the escape key.)

        This should only be used if the default button does not lead to data loss, because users may quickly press the escape key before reading the text in a dialog.

      • TRIGGERS_NONDEFAULT

        public static final DialogFooter.EscapeKeyBehavior TRIGGERS_NONDEFAULT
        This triggers the non-default button when the escape key is pressed. If no non-default button is defined: this does nothing. (Also on Macs command+period acts the same as the escape key.)

        This should only be used if the non-default button does not lead to data loss, because users may quickly press the escape key before reading the text in a dialog.

    • Method Detail

      • values

        public static DialogFooter.EscapeKeyBehavior[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (DialogFooter.EscapeKeyBehavior c : DialogFooter.EscapeKeyBehavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static DialogFooter.EscapeKeyBehavior valueOf(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null