Interface SelectorSection
-
- All Superinterfaces:
Section
- All Known Subinterfaces:
DrillableSelectorSection,SectionSelectorSection
- All Known Implementing Classes:
AbstractDrillableSelectorSection,AbstractSelectorSection,DefaultSectionSelectorSection
public interface SelectorSection extends Section
Section which allows the user to select items and handle events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<TypedObject>getItems()Returns this selector's (root) items.TypedObjectgetSelectedItem()Returns the selected item.java.util.List<TypedObject>getSelectedItems()Returns the selector's currently selected items.booleanisInitiallySelected()Returns whether initial selection is enabled or not.booleanisItemActive(TypedObject item)Returns whether the itemitemis active or not.booleanisMultiple()Returns whether this selector supports multiple selection or not.voidselectionChanged()Called whenever this selector's selection has changed.voidsetInitiallySelected(boolean initSelection)Sets whether the first item should be initially selected or not.voidsetItems(java.util.List<TypedObject> items)Sets the (root) items which this selector should render.voidsetMultiple(boolean multi)Sets whether this selector supports multiple selection or not.voidsetSelectedItem(TypedObject selectedItem)Sets the selector's selected item toselectedItemvoidsetSelectedItems(java.util.List<TypedObject> selectedItems)Sets the selector's selected items toselectedItems.voidsetSelectedItemsDirectly(java.util.List<TypedObject> selectedItems)Does the same thing assetSelectedItems(List)with the exception that no event is fired.-
Methods inherited from interface de.hybris.platform.cockpit.components.sectionpanel.Section
getLabel, getLocalizedLabel, isInitialOpen, isOpen, isTabbed, isVisible, setOpen
-
-
-
-
Method Detail
-
setItems
void setItems(java.util.List<TypedObject> items)
Sets the (root) items which this selector should render.- Parameters:
items- this selector's new items
-
getItems
java.util.List<TypedObject> getItems()
Returns this selector's (root) items.- Returns:
- the root items of this selector
-
setMultiple
void setMultiple(boolean multi)
Sets whether this selector supports multiple selection or not.- Parameters:
multi- whether multiple selection should be allowed or not
-
isMultiple
boolean isMultiple()
Returns whether this selector supports multiple selection or not.- Returns:
trueif multiple selection is allowed,falseotherwise
-
setSelectedItems
void setSelectedItems(java.util.List<TypedObject> selectedItems)
Sets the selector's selected items toselectedItems.- Parameters:
selectedItems- the new selection of the selector- See Also:
setSelectedItemsDirectly(List)
-
setSelectedItem
void setSelectedItem(TypedObject selectedItem)
Sets the selector's selected item toselectedItem- Parameters:
selectedItem- the selected item
-
setSelectedItemsDirectly
void setSelectedItemsDirectly(java.util.List<TypedObject> selectedItems)
Does the same thing assetSelectedItems(List)with the exception that no event is fired.- Parameters:
selectedItems- the selected items- See Also:
setSelectedItems(List)
-
getSelectedItems
java.util.List<TypedObject> getSelectedItems()
Returns the selector's currently selected items.- Returns:
- the selector's selected items
-
getSelectedItem
TypedObject getSelectedItem()
Returns the selected item. Note: In multiple selection mode, it is up to the implementing classes to define what is considered to be the selected item.- Returns:
- the selected item
- See Also:
getSelectedItems()
-
selectionChanged
void selectionChanged()
Called whenever this selector's selection has changed.
-
isItemActive
boolean isItemActive(TypedObject item)
Returns whether the itemitemis active or not. Exactly what active means depends on the implementation. Typically active selector items are rendered differently than normal items.- Parameters:
item- the item- Returns:
trueifitemis active,falseotherwise
-
setInitiallySelected
void setInitiallySelected(boolean initSelection)
Sets whether the first item should be initially selected or not.- Parameters:
initSelection-trueif inital selection should be enabled,falseotherwise
-
isInitiallySelected
boolean isInitiallySelected()
Returns whether initial selection is enabled or not.- Returns:
trueif initial selection is enabled,falseotherwise
-
-