public enum OnClose extends Enum<OnClose>
Use of such an enumeration provides a clearer and safer alternative to using
the members of WindowConstants
.
It is important to note that
JDialog.setDefaultCloseOperation(int)
allows for
only 3 of these operations. It does not allow for EXIT
.
Enum Constant and Description |
---|
DISPOSE |
DO_NOTHING |
EXIT |
HIDE |
Modifier and Type | Method and Description |
---|---|
int |
getIntValue()
Return the integer value of the corresponding constant in
WindowConstants . |
static OnClose |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OnClose[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OnClose DO_NOTHING
public static OnClose[] values()
for (OnClose c : OnClose.values()) System.out.println(c);
public static OnClose valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic int getIntValue()
WindowConstants
.Copyright Hirondelle Systems - Generated 2013Sep20.11.16