Package limn.backend
Enum Class ClosePolicy
- All Implemented Interfaces:
Serializable,Comparable<ClosePolicy>,Constable
What a user's close of a window does once it is allowed: set with
NativeWindow.setClosePolicy(limn.backend.ClosePolicy), DISPOSE by default.
Whether the close is allowed is a separate question, the window's
handler's, so a window can both ask and hide. A
program's NativeWindow.requestClose() is not a user's close: it disposes the window
whatever the policy says.
A 1.x minor release may add constants to this enum: a switch over it needs a
default branch.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe window is destroyed.The close asks to end the whole application instead, asBackend.requestQuit()does: every window is asked, this one among them, and nothing closes unless all agree.The window is hidden and kept, to be shown again withNativeWindow.show(). -
Method Summary
Modifier and TypeMethodDescriptionstatic ClosePolicyReturns the enum constant of this class with the specified name.static ClosePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISPOSE
The window is destroyed. The default. -
HIDE
The window is hidden and kept, to be shown again withNativeWindow.show(). A hidden window is still an open one, so underLoopLifetime.UNTIL_LAST_WINDOWit keeps the loop running. -
END_APPLICATION
The close asks to end the whole application instead, asBackend.requestQuit()does: every window is asked, this one among them, and nothing closes unless all agree.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-