com.smartgwt.client.types
Enum LocatorTypeStrategy

java.lang.Object
  extended by java.lang.Enum<LocatorTypeStrategy>
      extended by com.smartgwt.client.types.LocatorTypeStrategy
All Implemented Interfaces:
ValueEnum, Serializable, Comparable<LocatorTypeStrategy>

public enum LocatorTypeStrategy
extends Enum<LocatorTypeStrategy>
implements ValueEnum

When attempting to identify a component from within a list of possible candidates as described com.smartgwt.client..LocatorStrategy, if we are unable to find a unique match by name or title, we will use the recorded "type" of the component to verify an apparent match.

By default we check the following properties in order:

In some cases an explicit locatorTypeStrategy can be specified to modify this behavior. As with com.smartgwt.client..LocatorStrategy, if we are unable to match using the specified type strategy we continue to test against the remaining strategies in order - so if a type stratgy of "scClass" was specified but we were unable to find a match with the appropriate core superclass, we will attempt to match by role. Possible values are:


Enum Constant Summary
CLASS
          Match by class if possible
NONE
          Don't attempt to compare type in any way
ROLE
          Ignore class altogether and attempt to match by role
SCCLASS
          Ignore specific class and match by the Smart GWT framework superclass.
 
Method Summary
 String getValue()
           
static LocatorTypeStrategy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LocatorTypeStrategy[] 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

CLASS

public static final LocatorTypeStrategy CLASS
Match by class if possible


SCCLASS

public static final LocatorTypeStrategy SCCLASS
Ignore specific class and match by the Smart GWT framework superclass.


ROLE

public static final LocatorTypeStrategy ROLE
Ignore class altogether and attempt to match by role


NONE

public static final LocatorTypeStrategy NONE
Don't attempt to compare type in any way

Method Detail

values

public static LocatorTypeStrategy[] 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 (LocatorTypeStrategy c : LocatorTypeStrategy.values())
    System.out.println(c);

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

valueOf

public static LocatorTypeStrategy 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

getValue

public String getValue()
Specified by:
getValue in interface ValueEnum