com.pushtotest.tool.parser.html
Class TextElement

java.lang.Object
  extended by com.pushtotest.tool.parser.html.FormElementWrapper
      extended by com.pushtotest.tool.parser.html.TextElement
All Implemented Interfaces:
FormElement

public class TextElement
extends FormElementWrapper

This is the form element that represents a text field.


Field Summary
static int PASSWORD
           
static int TEXT
           
 
Constructor Summary
TextElement()
           
 
Method Summary
 java.lang.String getType()
          The type of this element.
 java.lang.String getValueAsString()
          The value parameter as a string.
 void setType(int type)
          Sets the type of this Text element.
 void setValueAsString(java.lang.String value)
          Sets the value of this form element as a string representation.
 java.lang.String toString()
          A string representation of this text element.
 
Methods inherited from class com.pushtotest.tool.parser.html.FormElementWrapper
getId, getLabel, getName, getParentForm, isXhtml, setId, setLabel, setName, setParentForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT

public static final int TEXT
See Also:
Constant Field Values

PASSWORD

public static final int PASSWORD
See Also:
Constant Field Values
Constructor Detail

TextElement

public TextElement()
Method Detail

getType

public java.lang.String getType()
The type of this element.

Specified by:
getType in interface FormElement
Specified by:
getType in class FormElementWrapper
Returns:
The type of this element.

setType

public void setType(int type)
Sets the type of this Text element. can either be TextElement.TEXT or TextElement.PASSWORD If another integer is passed in, the type will be set to TEXT.

Parameters:
The - type of this text element.

getValueAsString

public java.lang.String getValueAsString()
The value parameter as a string.

Specified by:
getValueAsString in interface FormElement
Specified by:
getValueAsString in class FormElementWrapper
Returns:
The value of this element as a string.

setValueAsString

public void setValueAsString(java.lang.String value)
Sets the value of this form element as a string representation. Some elements might have other value setter methods, this is to insure that all of them have one common one.

Specified by:
setValueAsString in interface FormElement
Specified by:
setValueAsString in class FormElementWrapper
Parameters:
value - The value of the form element as a string.

toString

public java.lang.String toString()
A string representation of this text element.

Overrides:
toString in class java.lang.Object
Returns:
The string that is like this element.