Serializable
, Comparable<FocusEvent.Cause>
, Constable
FocusEvent
public static enum FocusEvent.Cause extends Enum<FocusEvent.Cause>
FocusEvent
- the reason why it occurred. Possible reasons include mouse events, keyboard focus traversal, window activation. If no cause is provided then the reason is UNKNOWN
.Enum.EnumDesc<E extends Enum<E>>
Enum Constant | Description |
---|---|
ACTIVATION |
An activation of a toplevel window. |
CLEAR_GLOBAL_FOCUS_OWNER |
Clearing global focus owner. |
MOUSE_EVENT |
An activating mouse event. |
ROLLBACK |
Restoring focus after a focus request has been rejected. |
TRAVERSAL |
A focus traversal action with unspecified direction. |
TRAVERSAL_BACKWARD |
A backward focus traversal action. |
TRAVERSAL_DOWN |
A down-cycle focus traversal action. |
TRAVERSAL_FORWARD |
A forward focus traversal action. |
TRAVERSAL_UP |
An up-cycle focus traversal action. |
UNEXPECTED |
A system action causing an unexpected focus change. |
UNKNOWN |
The default value. |
Modifier and Type | Method | Description |
---|---|---|
static FocusEvent.Cause |
valueOf |
Returns the enum constant of this class with the specified name. |
static FocusEvent.Cause[] |
values() |
Returns an array containing the constants of this enum class, in the order they are declared. |
public static final FocusEvent.Cause UNKNOWN
public static final FocusEvent.Cause MOUSE_EVENT
public static final FocusEvent.Cause TRAVERSAL
public static final FocusEvent.Cause TRAVERSAL_UP
public static final FocusEvent.Cause TRAVERSAL_DOWN
public static final FocusEvent.Cause TRAVERSAL_FORWARD
public static final FocusEvent.Cause TRAVERSAL_BACKWARD
public static final FocusEvent.Cause ROLLBACK
public static final FocusEvent.Cause UNEXPECTED
public static final FocusEvent.Cause ACTIVATION
public static final FocusEvent.Cause CLEAR_GLOBAL_FOCUS_OWNER
public static FocusEvent.Cause[] values()
public static FocusEvent.Cause valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/java/awt/event/FocusEvent.Cause.html