com.jniwrapper.win32.ie.dom
Class ElementTypes

java.lang.Object
  extended by com.jniwrapper.win32.ie.dom.ElementTypes

public class ElementTypes
extends java.lang.Object

This class is helper for resolving element types. For example, this class contains ElementTypes.isLink(Element) method that returns true for hyperlink element (tag name equals to "a").


Field Summary
static java.lang.String TAG_BODY
           
static java.lang.String TAG_BUTTON
           
static java.lang.String TAG_CHECKBOX
           
static java.lang.String TAG_DIV
           
static java.lang.String TAG_FILE_UPLOAD
           
static java.lang.String TAG_FORM
           
static java.lang.String TAG_HEAD
           
static java.lang.String TAG_IMAGE
           
static java.lang.String TAG_INPUT
           
static java.lang.String TAG_LINK
           
static java.lang.String TAG_PASSWORD_FIELD
           
static java.lang.String TAG_RADIO_BUTTON
           
static java.lang.String TAG_SELECT
           
static java.lang.String TAG_SELECT_OPTION
           
static java.lang.String TAG_SUBMIT
           
static java.lang.String TAG_TABLE
           
static java.lang.String TAG_TEXT_AREA
           
static java.lang.String TAG_TEXT_FIELD
           
static java.lang.String TYPE_BUTTON
           
static java.lang.String TYPE_CHECKBOX
           
static java.lang.String TYPE_FILE_UPLOAD
           
static java.lang.String TYPE_PASSWORD_FIELD
           
static java.lang.String TYPE_RADIO_BUTTON
           
static java.lang.String TYPE_SUBMIT
           
static java.lang.String TYPE_TEXT_FIELD
           
 
Constructor Summary
ElementTypes()
           
 
Method Summary
static boolean isBody(org.w3c.dom.Element element)
          Returns true if specified element is body element.
static boolean isButton(org.w3c.dom.Element element)
          Returns true if specified element is button.
static boolean isCheckbox(org.w3c.dom.Element element)
          Returns true if specified element is checkbox.
static boolean isDiv(org.w3c.dom.Element element)
          Returns true if specified element is div element.
static boolean isElementWithTag(org.w3c.dom.Element element, java.lang.String tagName)
          Returns true if element is represented by tag with specified name.
static boolean isElementWithType(org.w3c.dom.Element element, java.lang.String type)
          Return true if element has specified type attribute.
static boolean isFileUpload(org.w3c.dom.Element element)
          Returns true if specified element is file upload element.
static boolean isForm(org.w3c.dom.Element element)
          Returns true if specified element is form element.
static boolean isHead(org.w3c.dom.Element element)
          Returns true if specified element is head element.
static boolean isImage(org.w3c.dom.Element element)
          Returns true if specified element is image element.
static boolean isLink(org.w3c.dom.Element element)
          Returns true if specified element is link element.
static boolean isPasswordField(org.w3c.dom.Element element)
          Returns true if specified element is password field.
static boolean isRadioButton(org.w3c.dom.Element element)
          Returns true if specified element is radio button.
static boolean isSelect(org.w3c.dom.Element element)
          Returns true if specified element is select element.
static boolean isSelectOption(org.w3c.dom.Element element)
          Returns true if specified element is select option.
static boolean isSubmit(org.w3c.dom.Element element)
          Returns true if specified element is submit.
static boolean isTable(org.w3c.dom.Element element)
          Returns true if specified element is table element.
static boolean isTextArea(org.w3c.dom.Element element)
          Returns true if specified element is text area.
static boolean isTextField(org.w3c.dom.Element element)
          Returns true if specified element is text field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_HEAD

public static final java.lang.String TAG_HEAD
See Also:
Constant Field Values

TAG_BODY

public static final java.lang.String TAG_BODY
See Also:
Constant Field Values

TAG_LINK

public static final java.lang.String TAG_LINK
See Also:
Constant Field Values

TAG_IMAGE

public static final java.lang.String TAG_IMAGE
See Also:
Constant Field Values

TAG_DIV

public static final java.lang.String TAG_DIV
See Also:
Constant Field Values

TAG_TABLE

public static final java.lang.String TAG_TABLE
See Also:
Constant Field Values

TAG_FORM

public static final java.lang.String TAG_FORM
See Also:
Constant Field Values

TAG_INPUT

public static final java.lang.String TAG_INPUT
See Also:
Constant Field Values

TAG_TEXT_FIELD

public static final java.lang.String TAG_TEXT_FIELD
See Also:
Constant Field Values

TAG_PASSWORD_FIELD

public static final java.lang.String TAG_PASSWORD_FIELD
See Also:
Constant Field Values

TAG_CHECKBOX

public static final java.lang.String TAG_CHECKBOX
See Also:
Constant Field Values

TAG_RADIO_BUTTON

public static final java.lang.String TAG_RADIO_BUTTON
See Also:
Constant Field Values

TAG_FILE_UPLOAD

public static final java.lang.String TAG_FILE_UPLOAD
See Also:
Constant Field Values

TAG_SUBMIT

public static final java.lang.String TAG_SUBMIT
See Also:
Constant Field Values

TYPE_TEXT_FIELD

public static final java.lang.String TYPE_TEXT_FIELD
See Also:
Constant Field Values

TYPE_PASSWORD_FIELD

public static final java.lang.String TYPE_PASSWORD_FIELD
See Also:
Constant Field Values

TYPE_CHECKBOX

public static final java.lang.String TYPE_CHECKBOX
See Also:
Constant Field Values

TYPE_RADIO_BUTTON

public static final java.lang.String TYPE_RADIO_BUTTON
See Also:
Constant Field Values

TYPE_FILE_UPLOAD

public static final java.lang.String TYPE_FILE_UPLOAD
See Also:
Constant Field Values

TYPE_BUTTON

public static final java.lang.String TYPE_BUTTON
See Also:
Constant Field Values

TYPE_SUBMIT

public static final java.lang.String TYPE_SUBMIT
See Also:
Constant Field Values

TAG_BUTTON

public static final java.lang.String TAG_BUTTON
See Also:
Constant Field Values

TAG_TEXT_AREA

public static final java.lang.String TAG_TEXT_AREA
See Also:
Constant Field Values

TAG_SELECT

public static final java.lang.String TAG_SELECT
See Also:
Constant Field Values

TAG_SELECT_OPTION

public static final java.lang.String TAG_SELECT_OPTION
See Also:
Constant Field Values
Constructor Detail

ElementTypes

public ElementTypes()
Method Detail

isHead

public static boolean isHead(org.w3c.dom.Element element)
Returns true if specified element is head element.

Parameters:
element - DOM element
Returns:
true for head element else returns false

isBody

public static boolean isBody(org.w3c.dom.Element element)
Returns true if specified element is body element.

Parameters:
element - DOM element
Returns:
true for body element else returns false

isLink

public static boolean isLink(org.w3c.dom.Element element)
Returns true if specified element is link element.

Parameters:
element - DOM element
Returns:
true for link element else returns false

isImage

public static boolean isImage(org.w3c.dom.Element element)
Returns true if specified element is image element.

Parameters:
element - DOM element
Returns:
true for image element else returns false

isDiv

public static boolean isDiv(org.w3c.dom.Element element)
Returns true if specified element is div element.

Parameters:
element - DOM element
Returns:
true for div element else returns false

isTable

public static boolean isTable(org.w3c.dom.Element element)
Returns true if specified element is table element.

Parameters:
element - DOM element
Returns:
true for table element else returns false

isForm

public static boolean isForm(org.w3c.dom.Element element)
Returns true if specified element is form element.

Parameters:
element - DOM element
Returns:
true for form element else returns false

isTextField

public static boolean isTextField(org.w3c.dom.Element element)
Returns true if specified element is text field.

Parameters:
element - DOM element
Returns:
true for text field else returns false

isTextArea

public static boolean isTextArea(org.w3c.dom.Element element)
Returns true if specified element is text area.

Parameters:
element - DOM element
Returns:
true for text area else returns false

isPasswordField

public static boolean isPasswordField(org.w3c.dom.Element element)
Returns true if specified element is password field.

Parameters:
element - DOM element
Returns:
true for password field else returns false

isCheckbox

public static boolean isCheckbox(org.w3c.dom.Element element)
Returns true if specified element is checkbox.

Parameters:
element - DOM element
Returns:
true for checkbox else returns false

isRadioButton

public static boolean isRadioButton(org.w3c.dom.Element element)
Returns true if specified element is radio button.

Parameters:
element - DOM element
Returns:
true for radio button else returns false

isSelect

public static boolean isSelect(org.w3c.dom.Element element)
Returns true if specified element is select element.

Parameters:
element - DOM element
Returns:
true for select element else returns false

isSelectOption

public static boolean isSelectOption(org.w3c.dom.Element element)
Returns true if specified element is select option.

Parameters:
element - DOM element
Returns:
true for select option else returns false

isButton

public static boolean isButton(org.w3c.dom.Element element)
Returns true if specified element is button.

Parameters:
element - DOM element
Returns:
true for button else returns false

isFileUpload

public static boolean isFileUpload(org.w3c.dom.Element element)
Returns true if specified element is file upload element.

Parameters:
element - DOM element
Returns:
true for file upload else returns false

isSubmit

public static boolean isSubmit(org.w3c.dom.Element element)
Returns true if specified element is submit.

Parameters:
element - DOM element
Returns:
true for submit else returns false

isElementWithType

public static boolean isElementWithType(org.w3c.dom.Element element,
                                        java.lang.String type)
Return true if element has specified type attribute.

Parameters:
element - DOM element
type - value for type attribute
Returns:
true if element has specified type attribute. Comparation of attribute

isElementWithTag

public static boolean isElementWithTag(org.w3c.dom.Element element,
                                       java.lang.String tagName)
Returns true if element is represented by tag with specified name.

Parameters:
element - DOM element
tagName - HTML tag name
Returns:
true if element is represented by tag with specified name