Package org.fest.swing.core
Enum Class ComponentLookupScope
- All Implemented Interfaces:
Serializable
,Comparable<ComponentLookupScope>
,Constable
Understands scopes of GUI component lookup.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll GUI components participate in a component lookup, regardless if they are being shown on the screen or not.For most of the cases, only GUI components that are being shown on the screen participate in a component lookup.Only components that are being shown on the screen can participate in a component lookup. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether showing components are the only ones participating in component lookups.static ComponentLookupScope
Returns the enum constant of this class with the specified name.static ComponentLookupScope[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
For most of the cases, only GUI components that are being shown on the screen participate in a component lookup. Currently, the only exception is
, which participates in a component lookup regardless if it is showing or not.JMenuItem
-
ALL
All GUI components participate in a component lookup, regardless if they are being shown on the screen or not. -
SHOWING_ONLY
Only components that are being shown on the screen can participate in a component lookup.
-
-
Field Details
-
requireShowing
private final boolean requireShowing
-
-
Constructor Details
-
ComponentLookupScope
private ComponentLookupScope(boolean requireShowing)
-
-
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
-
requireShowing
public boolean requireShowing()Returns whether showing components are the only ones participating in component lookups.- Returns:
true
if only showing components participate in component lookups;false
if any component (showing or not showing) can participate in component lookup.
-