Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.key
Enum Class TransferFocusOnEnter
- All Implemented Interfaces:
Serializable
,Comparable<TransferFocusOnEnter>
,Constable
A utility enum for enabled focus traversal based on the Enter key.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTransfer the focus backward when Enter is pressed with theInputEvent.SHIFT_DOWN_MASK
modifier enabled.Transfer the focus forward when Enter is pressed.Transfer the focus forward when Enter is pressed and backward when Enter is pressed with theInputEvent.SHIFT_DOWN_MASK
modifier enabled. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
enable
(JComponent... components) static TransferFocusOnEnter
Returns the enum constant of this class with the specified name.static TransferFocusOnEnter[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORWARD
Transfer the focus forward when Enter is pressed.
Note that in case of
JTextArea
theInputEvent.CTRL_DOWN_MASK
modifier is added. -
BACKWARD
Transfer the focus backward when Enter is pressed with the
InputEvent.SHIFT_DOWN_MASK
modifier enabled. -
FORWARD_BACKWARD
Transfer the focus forward when Enter is pressed and backward when Enter is pressed with the
InputEvent.SHIFT_DOWN_MASK
modifier enabled.Note that in case of
JTextArea
theInputEvent.CTRL_DOWN_MASK
modifier is added for the forward trigger.
-
-
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
-
enable
- Parameters:
components
- the components for which to enable focus transfer on enter
-