com.atlassian.webtest.ui.keys
Enum TypeMode

java.lang.Object
  extended by java.lang.Enum<TypeMode>
      extended by com.atlassian.webtest.ui.keys.TypeMode
All Implemented Interfaces:
Serializable, Comparable<TypeMode>

public enum TypeMode
extends Enum<TypeMode>

Enumeration of possible type modes. Surprisingly, there are many ways to insert a text into a HTML input on a page. They differ in speed, reliability and events raised by the browser. Every element in the framework capable of inserting a text into it should document its default type mode and optionally expose methods for different type modes.

NOTE: use this facility sparingly, most of the time you should be relying on the default type mode of any element. Implementations are not obliged to honour this setting.


Enum Constant Summary
DEFAULT
          The type target decides itself about the type mode.
INSERT
          Simply set the value of a HTML element.
INSERT_WITH_EVENT
          Insert all characters and invoke all events for the last typed key.
TYPE
          Type into the component invoking all associated key events for each stroke.
 
Method Summary
static TypeMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TypeMode[] 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 TypeMode DEFAULT
The type target decides itself about the type mode. This is the recommended option in most cases!


INSERT

public static final TypeMode INSERT
Simply set the value of a HTML element. This is the fastest way, but will not invoke any events.


INSERT_WITH_EVENT

public static final TypeMode INSERT_WITH_EVENT
Insert all characters and invoke all events for the last typed key.


TYPE

public static final TypeMode TYPE
Type into the component invoking all associated key events for each stroke.

Method Detail

values

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

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

valueOf

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


Copyright © 2014 Atlassian. All rights reserved.