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.TypedObject
getSelectedItem()
Returns the selected item.java.util.List<TypedObject>
getSelectedItems()
Returns the selector's currently selected items.boolean
isInitiallySelected()
Returns whether initial selection is enabled or not.boolean
isItemActive(TypedObject item)
Returns whether the itemitem
is active or not.boolean
isMultiple()
Returns whether this selector supports multiple selection or not.void
selectionChanged()
Called whenever this selector's selection has changed.void
setInitiallySelected(boolean initSelection)
Sets whether the first item should be initially selected or not.void
setItems(java.util.List<TypedObject> items)
Sets the (root) items which this selector should render.void
setMultiple(boolean multi)
Sets whether this selector supports multiple selection or not.void
setSelectedItem(TypedObject selectedItem)
Sets the selector's selected item toselectedItem
void
setSelectedItems(java.util.List<TypedObject> selectedItems)
Sets the selector's selected items toselectedItems
.void
setSelectedItemsDirectly(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:
true
if multiple selection is allowed,false
otherwise
-
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 itemitem
is 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:
true
ifitem
is active,false
otherwise
-
setInitiallySelected
void setInitiallySelected(boolean initSelection)
Sets whether the first item should be initially selected or not.- Parameters:
initSelection
-true
if inital selection should be enabled,false
otherwise
-
isInitiallySelected
boolean isInitiallySelected()
Returns whether initial selection is enabled or not.- Returns:
true
if initial selection is enabled,false
otherwise
-
-