Class SelectControl
- java.lang.Object
-
- com.openhtmltopdf.simple.xhtml.controls.AbstractControl
-
- com.openhtmltopdf.simple.xhtml.controls.SelectControl
-
- All Implemented Interfaces:
FormControl
public class SelectControl extends AbstractControl
-
-
Constructor Summary
Constructors Constructor Description SelectControl(XhtmlForm form, Element e)
-
Method Summary
Modifier and Type Method Description String[]getMultipleValues()MapgetOptions()intgetSize()booleanisMultiple()voidreset()Reset the control to it's initial statevoidsetMultipleValues(String[] values)Sets the control's current values (when isMultiple returns true).voidsetValue(String value)Sets the control's current value.-
Methods inherited from class com.openhtmltopdf.simple.xhtml.controls.AbstractControl
addFormControlListener, collectText, fireChanged, fireEnabled, fireSuccessful, getElement, getForm, getInitialValue, getIntAttribute, getName, getValue, isEnabled, isHidden, isSuccessful, removeFormControlListener, setEnabled, setInitialValue, setSuccessful
-
-
-
-
Method Detail
-
getSize
public int getSize()
-
isMultiple
public boolean isMultiple()
- Specified by:
isMultiplein interfaceFormControl- Overrides:
isMultiplein classAbstractControl- Returns:
trueif this control accepts multiple values,falseotherwise
-
getOptions
public Map getOptions()
-
setValue
public void setValue(String value)
Description copied from interface:FormControlSets the control's current value. This has no effect when isMultiple returns true.- Specified by:
setValuein interfaceFormControl- Overrides:
setValuein classAbstractControl
-
getMultipleValues
public String[] getMultipleValues()
- Specified by:
getMultipleValuesin interfaceFormControl- Overrides:
getMultipleValuesin classAbstractControl- Returns:
- the control's current values or
nullif isMultiple returns false
-
setMultipleValues
public void setMultipleValues(String[] values)
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- Overrides:
setMultipleValuesin classAbstractControl
-
reset
public void reset()
Description copied from interface:FormControlReset the control to it's initial state- Specified by:
resetin interfaceFormControl- Overrides:
resetin classAbstractControl
-
-