com.pushtotest.tool.parser.html
Interface Selectable

All Known Implementing Classes:
CheckElement, OptionElement, RadioElement, SelectElement

public interface Selectable

An interface to represent Form Elements that might be able to be 'selected' in a form.


Method Summary
 boolean isSelected()
          Is this element selected, checked, etc.
 void select(boolean select)
          Sets the selection value of this element.
 void setMultiple(boolean multiple)
          Sets the multiple value to a boolean.
 boolean supportsMultiple()
          Does this form element support multiple selections.
 

Method Detail

isSelected

boolean isSelected()
Is this element selected, checked, etc.

Returns:
Whether or not this element is selected.

select

void select(boolean select)
Sets the selection value of this element. Some elements might not support multiple selects (e.g. radio), so calling this with true will cause them to possibly unselect other values.

Parameters:
select - Whether or not this element should be selected.

supportsMultiple

boolean supportsMultiple()
Does this form element support multiple selections. Could be constant (e.g. checkbox would be true and radio would be false) or (like selects) could depend on parameters in the form element.

Returns:
Whether this Selectable item supports multiple selections.

setMultiple

void setMultiple(boolean multiple)
Sets the multiple value to a boolean. Some implementations should ignore this setting because they will always or never support multiples.

Parameters:
multiple - Sets the multiple value.