org.olat.core.gui.components.form.flexible.elements
Interface MultipleSelectionElement

All Superinterfaces:
FormBaseComponentIdProvider, FormItem, SelectionElement
All Known Implementing Classes:
MultipleSelectionElementImpl, MultiSelectionTree

public interface MultipleSelectionElement
extends SelectionElement

Description:
TODO: patrickb Class Description for MultipleSelectionElement

Initial Date: 04.01.2007

Author:
felix, patrickb

Field Summary
 
Fields inherited from interface org.olat.core.gui.components.form.flexible.FormItem
ERRORC, EXAMPLEC, LABELC
 
Fields inherited from interface org.olat.core.gui.components.form.flexible.FormBaseComponentIdProvider
DISPPREFIX
 
Method Summary
 java.util.Set<java.lang.String> getSelectedKeys()
           
 boolean isAtLeastSelected(int howmany)
           
 void selectAll()
          Select all selection elements.
 void setEnabled(java.util.Set<java.lang.String> keys, boolean isEnabled)
          Enables or disables several checkboxes at once by applying setEnabled(String, boolean) to the checkboxes with the keys given in keys.
 void setEnabled(java.lang.String key, boolean isEnabled)
          Enables or disables a checkbox.
 void setKeysAndValues(java.lang.String[] keys, java.lang.String[] values, java.lang.String[] cssClasses)
           
 void setVisible(java.util.Set<java.lang.String> keys, boolean isEnabled)
          Shows or hides several checkboxes at once by applying setVisible(String, boolean) to the checkboxes with the keys given in keys.
 void setVisible(java.lang.String key, boolean isVisible)
          Shows or hides a checkbox.
 void uncheckAll()
          Incheck all selection elements.
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.elements.SelectionElement
getKey, getSize, getValue, isMultiselect, isSelected, select
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.FormItem
addActionListener, clearError, doDispatchFormRequest, evalFormRequest, getAction, getActionListenersFor, getComponent, getErrorC, getErrorText, getExampleC, getExampleText, getLabelC, getLabelText, getName, getRootForm, getTranslator, getUserObject, hasError, hasExample, hasFocus, hasLabel, isEnabled, isMandatory, isVisible, reset, setEnabled, setErrorComponent, setErrorKey, setExampleKey, setFocus, setLabel, setLabelComponent, setMandatory, setRootForm, setTranslator, setUserObject, setVisible, showError, showExample, showLabel, validate
 
Methods inherited from interface org.olat.core.gui.components.form.flexible.FormBaseComponentIdProvider
getFormDispatchId
 

Method Detail

getSelectedKeys

java.util.Set<java.lang.String> getSelectedKeys()
Returns:
a Set of Strings

setKeysAndValues

void setKeysAndValues(java.lang.String[] keys,
                      java.lang.String[] values,
                      java.lang.String[] cssClasses)
Parameters:
keys -
values -
cssClasses - The CSS classes that should be used in the form element for each key-value pair or NULL not not use special styling

isAtLeastSelected

boolean isAtLeastSelected(int howmany)
Parameters:
howmany -
Returns:

selectAll

void selectAll()
Select all selection elements.


uncheckAll

void uncheckAll()
Incheck all selection elements.


setEnabled

void setEnabled(java.lang.String key,
                boolean isEnabled)
Enables or disables a checkbox. Note that this is not the same as org.olat.core.gui.components.form.flexible.FormItem#setesetEnabled(boolean) which enables or disables all checkboxes of this form element.

Parameters:
key - The key of the checkbox.
isEnabled - true means enabled.

setEnabled

void setEnabled(java.util.Set<java.lang.String> keys,
                boolean isEnabled)
Enables or disables several checkboxes at once by applying setEnabled(String, boolean) to the checkboxes with the keys given in keys.

Parameters:
keys - Keys of the checkboxes.
isEnabled - Whether the checkboxes given in keys are to be enabled (true) or disabled (false).

setVisible

void setVisible(java.lang.String key,
                boolean isVisible)
Shows or hides a checkbox. Note that this is not the same as FormItem.setVisible(boolean) which shows or hides all checkboxes of this form element.

Parameters:
key - The key of the checkbox.
isEnabled - true means visible.

setVisible

void setVisible(java.util.Set<java.lang.String> keys,
                boolean isEnabled)
Shows or hides several checkboxes at once by applying setVisible(String, boolean) to the checkboxes with the keys given in keys.

Parameters:
keys - Keys of the checkboxes.
isEnabled - Whether the checkboxes given in keys are to be shown (true) or hidden (false).