jaxcent
Class HtmlInputCheckbox

java.lang.Object
  extended byjaxcent.JaxcentObject
      extended byjaxcent.JaxcentHtmlElement
          extended byjaxcent.HtmlInputCheckbox

public class HtmlInputCheckbox
extends JaxcentHtmlElement

The class HtmlInputCheckbox corresponds to INPUT tags of TYPE CHECKBOX on the page.


Constructor Summary
HtmlInputCheckbox(JaxcentPage page, SearchType searchType, java.lang.String str)
          Search for HTML element on page by specified search type and search string.
HtmlInputCheckbox(JaxcentPage page, SearchType searchType, java.lang.String[] attributes, java.lang.String[] values)
          Create new HTML element on page using the specified attributes and values.
HtmlInputCheckbox(JaxcentPage page, SearchType searchType, java.lang.String str, int index)
          Search for HTML Element on page by specified search type and search string, and search index.
HtmlInputCheckbox(JaxcentPage page, SearchType searchType, java.lang.String tag, java.lang.String text)
          Create new HTML Element on page using the specified tag.
HtmlInputCheckbox(JaxcentPage page, SearchType searchType, java.lang.String text, java.lang.String[] attributes, java.lang.String[] values)
          Create new HTML element on page using the specified text and attributes and values.
HtmlInputCheckbox(JaxcentPage page, java.lang.String id)
          Search for HTML element on page by specified ID
 
Method Summary
 void blur()
          Lose the input focus.
 void click()
          Simulate a mouse click on the HTML element.
 void focus()
          Get the input focus.
 boolean getChecked()
          Retrieve the "checked" property
 boolean getDefaultchecked()
          Returns whether this checkbox/radiobutton is checked on by default
 boolean getDisabled()
          Retrieve the "disabled" property
 java.lang.String getName()
          Retrieve the "name" property
 java.lang.String getValue()
          Retrieve the "value" property
protected  void onBlur()
          Override to handle the "blur" event
protected  void onClick()
          Override to handle the "click" event
protected  void onClick(java.lang.String value)
          Override to handle the "click" event and receive current element value
protected  void onFocus()
          Override to handle the "focus" event
 void scrollIntoView(boolean top)
          Bring the element into view, by scrolling if necessary.
 void setChecked(boolean value)
          Set the "checked" property
 void setDisabled(boolean value)
          Set the "disabled" property
 
Methods inherited from class jaxcent.JaxcentHtmlElement
getAttribute, getID, getInnerText, getStyle, getTag, hide, insertAfter, insertAtBeginning, insertAtBeginning, insertAtEnd, insertAtEnd, insertBefore, setAttribute, setInnerText, setStyle, setStyle, setStyle, setStyle, setVisible, show
 
Methods inherited from class jaxcent.JaxcentObject
addJavaScriptVerification, getId, getProperty, setId, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         java.lang.String id)
Search for HTML element on page by specified ID


HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         SearchType searchType,
                         java.lang.String str)
Search for HTML element on page by specified search type and search string. If the search returns multiple objects, use the first one. If the searchType is createNew and the thrid parameter is non null, the third parameter specifies the value attribute.


HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         SearchType searchType,
                         java.lang.String str,
                         int index)
Search for HTML Element on page by specified search type and search string, and search index. The search is expected to return multiple results. The search index is 0-based, and specifies the index in the multiple results. This constructor is not for use with createNew.


HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         SearchType searchType,
                         java.lang.String tag,
                         java.lang.String text)
                  throws Jaxception
Create new HTML Element on page using the specified tag. Search type must be createNew and tag must be "INPUT". If text is non null, the new element is populated with that text.


HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         SearchType searchType,
                         java.lang.String[] attributes,
                         java.lang.String[] values)
                  throws Jaxception
Create new HTML element on page using the specified attributes and values. Search type must be createNew. Attributes and values arrays must have the same length.


HtmlInputCheckbox

public HtmlInputCheckbox(JaxcentPage page,
                         SearchType searchType,
                         java.lang.String text,
                         java.lang.String[] attributes,
                         java.lang.String[] values)
                  throws Jaxception
Create new HTML element on page using the specified text and attributes and values. Search type must be createNew. Attributes and values arrays must have the same length.

Method Detail

onClick

protected void onClick()
Override to handle the "click" event


onClick

protected void onClick(java.lang.String value)
Override to handle the "click" event and receive current element value


onFocus

protected void onFocus()
Override to handle the "focus" event


onBlur

protected void onBlur()
Override to handle the "blur" event


setChecked

public void setChecked(boolean value)
                throws Jaxception
Set the "checked" property

Throws:
Jaxception

getChecked

public boolean getChecked()
                   throws Jaxception
Retrieve the "checked" property

Throws:
Jaxception

getDefaultchecked

public boolean getDefaultchecked()
                          throws Jaxception
Returns whether this checkbox/radiobutton is checked on by default

Throws:
Jaxception

setDisabled

public void setDisabled(boolean value)
                 throws Jaxception
Set the "disabled" property

Throws:
Jaxception

getDisabled

public boolean getDisabled()
                    throws Jaxception
Retrieve the "disabled" property

Throws:
Jaxception

getName

public java.lang.String getName()
                         throws Jaxception
Retrieve the "name" property

Throws:
Jaxception

getValue

public java.lang.String getValue()
                          throws Jaxception
Retrieve the "value" property

Throws:
Jaxception

blur

public void blur()
          throws Jaxception
Lose the input focus.

Throws:
Jaxception

click

public void click()
           throws Jaxception
Simulate a mouse click on the HTML element.

Throws:
Jaxception

focus

public void focus()
           throws Jaxception
Get the input focus.

Throws:
Jaxception

scrollIntoView

public void scrollIntoView(boolean top)
                    throws Jaxception
Bring the element into view, by scrolling if necessary. If top is true, the top of element is brought into view, otherwise the bottom of the element is scrolled into view.

Throws:
Jaxception