com.pushtotest.tool.parser.html
Class ButtonElement

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

public class ButtonElement
extends FormElementWrapper

Form element that represents a button in a form that a user could click.


Field Summary
static int CANCEL
           
static int SUBMIT
           
 
Constructor Summary
ButtonElement()
           
 
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 Button element.
 void setValueAsString(java.lang.String value)
          Sets the value of this form element as a string representation.
 java.lang.String toString()
           
 
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

SUBMIT

public static final int SUBMIT
See Also:
Constant Field Values

CANCEL

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

ButtonElement

public ButtonElement()
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 Button element. can either be ButtonElement.SUBMIT or ButtonElement.CANCEL If another integer is passed in, the type will be set to SUBMIT.

Parameters:
The - type of this button 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.
Throws:
java.lang.IllegalArgumentException - If the value can not be parsed into a valid value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object