Enum Class ComponentLookupScope

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

public enum ComponentLookupScope extends Enum<ComponentLookupScope>
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 Constants
    Enum Constant
    Description
    All 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
    Modifier and Type
    Field
    Description
    private final boolean
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    ComponentLookupScope(boolean requireShowing)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether showing components are the only ones participating in component lookups.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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.
  • Field Details

    • requireShowing

      private final boolean requireShowing
  • Constructor Details

    • ComponentLookupScope

      private ComponentLookupScope(boolean requireShowing)
  • Method Details

    • values

      public static ComponentLookupScope[] 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

      public static ComponentLookupScope valueOf(String name)
      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 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.