org.olat.core.gui.formelements
Class StaticSingleSelectionElement
java.lang.Object
org.olat.core.gui.formelements.AbstractFormElement
org.olat.core.gui.formelements.StaticSingleSelectionElement
- All Implemented Interfaces:
- FormElement, SelectionElement, SingleSelectionElement
- Direct Known Subclasses:
- RadioButtonGroupElement
public class StaticSingleSelectionElement
- extends AbstractFormElement
- implements SingleSelectionElement
- Author:
- Felix Jost
| Methods inherited from class org.olat.core.gui.formelements.AbstractFormElement |
clearError, getError, getExample, getLabelKey, getName, getVisualMarked, isError, isMandatory, isReadOnly, setError, setErrorKey, setErrorKeyWithParams, setExample, setLabelKey, setMandatory, setName, setReadOnly, setVisualMarked |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.olat.core.gui.formelements.FormElement |
clearError, getError, getExample, getLabelKey, getName, getVisualMarked, isError, isMandatory, isReadOnly, setError, setErrorKey, setErrorKeyWithParams, setLabelKey, setMandatory, setName, setReadOnly, setVisualMarked |
StaticSingleSelectionElement
public StaticSingleSelectionElement(java.lang.String labelKey,
java.lang.String[] keys,
java.lang.String[] values)
- Parameters:
labelKey - keys - values -
getKey
public java.lang.String getKey(int which)
- Specified by:
getKey in interface SelectionElement
- Returns:
- String
- See Also:
SelectionElement.getKey(int)
getValue
public java.lang.String getValue(int which)
- Specified by:
getValue in interface SelectionElement
- Returns:
- String
- See Also:
SelectionElement.getValue(int)
getSize
public int getSize()
- Specified by:
getSize in interface SelectionElement
- Returns:
- integer
- See Also:
SelectionElement.getSize()
isSelected
public boolean isSelected(int which)
- Specified by:
isSelected in interface SelectionElement
- Returns:
- boolean
- See Also:
SelectionElement.isSelected(int)
setValues
public void setValues(java.lang.String[] values)
- Description copied from interface:
FormElement
- // if the parameter is missing (values == null), ignore (this may be if a
formelement is readonly e.g.) H: formelement not readonly
- Specified by:
setValues in interface FormElement
- See Also:
FormElement.setValues(java.lang.String[])
getSelectedKey
public java.lang.String getSelectedKey()
- Specified by:
getSelectedKey in interface SingleSelectionElement
- Returns:
- See Also:
SingleSelectionElement.getSelectedKey()
isOneSelected
public boolean isOneSelected()
- Specified by:
isOneSelected in interface SingleSelectionElement
- Returns:
- See Also:
SingleSelectionElement.isOneSelected()
getSelected
public int getSelected()
- Returns the selected.
- Specified by:
getSelected in interface SingleSelectionElement
- Returns:
- int
select
public void select(java.lang.String key,
boolean select)
- Specified by:
select in interface SelectionElement
- See Also:
SelectionElement.select(java.lang.String,
boolean)
SingleSelectionElement
public void SingleSelectionElement()
isDirty
public boolean isDirty()
- Specified by:
isDirty in interface FormElement
- Returns:
- See Also:
FormElement.isDirty()