public abstract class AbstractControl extends Object implements FormControl
| Constructor and Description |
|---|
AbstractControl(XhtmlForm form,
Element e) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFormControlListener(FormControlListener listener) |
static String |
collectText(Element e) |
protected void |
fireChanged() |
protected void |
fireEnabled() |
protected void |
fireSuccessful() |
Element |
getElement() |
XhtmlForm |
getForm() |
String |
getInitialValue() |
static int |
getIntAttribute(Element e,
String attribute,
int def) |
String[] |
getMultipleValues() |
String |
getName() |
String |
getValue() |
boolean |
isEnabled()
Is this control enabled?
|
boolean |
isHidden() |
boolean |
isMultiple() |
boolean |
isSuccessful()
Is this control successful?
|
void |
removeFormControlListener(FormControlListener listener) |
void |
reset()
Reset the control to it's initial state
|
void |
setEnabled(boolean enabled)
Enable/disable this control
|
protected void |
setInitialValue(String value) |
void |
setMultipleValues(String[] values)
Sets the control's current values (when isMultiple returns true).
|
void |
setSuccessful(boolean successful)
Sets this control's successful state.
|
void |
setValue(String value)
Sets the control's current value.
|
protected void fireChanged()
protected void fireSuccessful()
protected void fireEnabled()
public void addFormControlListener(FormControlListener listener)
addFormControlListener in interface FormControlpublic void removeFormControlListener(FormControlListener listener)
removeFormControlListener in interface FormControlpublic Element getElement()
getElement in interface FormControlpublic XhtmlForm getForm()
getForm in interface FormControlpublic String getName()
getName in interface FormControlpublic String getInitialValue()
getInitialValue in interface FormControlprotected void setInitialValue(String value)
public String getValue()
getValue in interface FormControlnull if isMultiple
returns truepublic void setValue(String value)
FormControlsetValue in interface FormControlpublic String[] getMultipleValues()
getMultipleValues in interface FormControlnull if isMultiple
returns falsepublic void setMultipleValues(String[] values)
FormControlsetMultipleValues in interface FormControlpublic boolean isHidden()
public boolean isEnabled()
FormControlisEnabled in interface FormControltrue if this control is enabledpublic boolean isSuccessful()
FormControlisSuccessful in interface FormControltrue if this control is successful and its
name-value pair should be submitted, false
otherwise.public boolean isMultiple()
isMultiple in interface FormControltrue if this control accepts multiple values,
false otherwisepublic void setSuccessful(boolean successful)
FormControlsetSuccessful in interface FormControlpublic void setEnabled(boolean enabled)
FormControlsetEnabled in interface FormControlpublic void reset()
FormControlreset in interface FormControlCopyright © 2016. All rights reserved.