org.fest.swing.core
Enum ComponentLookupScope

java.lang.Object
  extended by java.lang.Enum<ComponentLookupScope>
      extended by org.fest.swing.core.ComponentLookupScope
All Implemented Interfaces:
Serializable, Comparable<ComponentLookupScope>

public enum ComponentLookupScope
extends Enum<ComponentLookupScope>

Understands scopes of GUI component lookup.

Author:
Alex Ruiz

Enum Constant Summary
ALL
          All GUI components participate in a component lookup, regardless if they are being shown on the screen or not.
DEFAULT
          For most of the cases, only GUI components that are being shown on the screen participate in a component lookup.
SHOWING_ONLY
          Only components that are being shown on the screen can participate in a component lookup.
 
Method Summary
 boolean requireShowing()
          Returns whether showing components are the only ones participating in component lookups.
static ComponentLookupScope valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ComponentLookupScope[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DEFAULT

public static final ComponentLookupScope 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 JMenuItem, which participates in a component lookup regardless if it is showing or not.


ALL

public static final ComponentLookupScope ALL
All GUI components participate in a component lookup, regardless if they are being shown on the screen or not.


SHOWING_ONLY

public static final ComponentLookupScope SHOWING_ONLY
Only components that are being shown on the screen can participate in a component lookup.

Method Detail

values

public static ComponentLookupScope[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ComponentLookupScope c : ComponentLookupScope.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ComponentLookupScope valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - 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.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.