Class AbstractControl
java.lang.Object
org.xhtmlrenderer.simple.xhtml.controls.AbstractControl
- All Implemented Interfaces:
FormControl
- Direct Known Subclasses:
ButtonControl,CheckControl,HiddenControl,SelectControl,TextControl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormControlListener(FormControlListener listener) static Stringprotected voidprotected voidprotected voidgetForm()static intgetIntAttribute(Element e, String attribute, int def) String[]getName()final StringgetValue()booleanIs this control enabled?booleanisHidden()booleanbooleanIs this control successful?voidremoveFormControlListener(FormControlListener listener) voidreset()Reset the control to it's initial statevoidsetEnabled(boolean enabled) Enable/disable this controlprotected final voidsetInitialValue(String value) voidsetMultipleValues(String[] values) Sets the control's current values (when isMultiple returns true).voidsetSuccessful(boolean successful) Sets this control's successful state.voidSets the control's current value.
-
Constructor Details
-
AbstractControl
-
-
Method Details
-
fireChanged
protected void fireChanged() -
fireSuccessful
protected void fireSuccessful() -
fireEnabled
protected void fireEnabled() -
addFormControlListener
- Specified by:
addFormControlListenerin interfaceFormControl
-
removeFormControlListener
- Specified by:
removeFormControlListenerin interfaceFormControl
-
getElement
- Specified by:
getElementin interfaceFormControl- Returns:
- the associated element
-
getForm
- Specified by:
getFormin interfaceFormControl- Returns:
- the associated form
-
getName
- Specified by:
getNamein interfaceFormControl- Returns:
- the name of the control
-
getInitialValue
- Specified by:
getInitialValuein interfaceFormControl- Returns:
- the initial value
-
setInitialValue
-
getValue
- Specified by:
getValuein interfaceFormControl- Returns:
- the control's current value or
nullif isMultiple returns true
-
setValue
Description copied from interface:FormControlSets the control's current value. This has no effect when isMultiple returns true.- Specified by:
setValuein interfaceFormControl
-
getMultipleValues
- Specified by:
getMultipleValuesin interfaceFormControl- Returns:
- the control's current values or
nullif isMultiple returns false
-
setMultipleValues
Description copied from interface:FormControlSets the control's current values (when isMultiple returns true). This has no effect when isMultiple returns false.- Specified by:
setMultipleValuesin interfaceFormControl
-
isHidden
public boolean isHidden() -
isEnabled
public boolean isEnabled()Description copied from interface:FormControlIs this control enabled?- Specified by:
isEnabledin interfaceFormControl- Returns:
trueif this control is enabled
-
isSuccessful
public boolean isSuccessful()Description copied from interface:FormControlIs this control successful?- Specified by:
isSuccessfulin interfaceFormControl- Returns:
trueif this control is successful and its name-value pair should be submitted,falseotherwise.
-
isMultiple
public boolean isMultiple()- Specified by:
isMultiplein interfaceFormControl- Returns:
trueif this control accepts multiple values,falseotherwise
-
setSuccessful
public void setSuccessful(boolean successful) Description copied from interface:FormControlSets this control's successful state.- Specified by:
setSuccessfulin interfaceFormControl
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:FormControlEnable/disable this control- Specified by:
setEnabledin interfaceFormControl
-
reset
public void reset()Description copied from interface:FormControlReset the control to it's initial state- Specified by:
resetin interfaceFormControl
-
collectText
-
getIntAttribute
-