Interface CollectionBrowserMoldContext
-
- All Known Implementing Classes:
DefaultCollectionBrowserContext
public interface CollectionBrowserMoldContextA set of methods that allowsCollectionBrowserMoldStrategyto communicate withCollectionBrowserController
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanareHyperlinksSupported()Informs if collection browser supports hyperlinks.SinglePagegetCurrentPage()DataTypegetCurrentType()Gets data type that is currently being displayedjava.lang.StringgetCurrentTypeCode()Gets data type code that is currently being displayedDragAndDropStrategygetDragAndDropStrategy()<E> EgetFocusedItem()Gets currently focused item ornullif no item is focused<E> java.util.Collection<E>getSelectedItems()Gets all currently selected itemsWidgetInstanceManagergetWidgetInstanceManager()Returns the widget instance manager of current controller.booleanisDragEnabled()booleanisDropEnabled()booleanisMultiSelectEnabled()Allows to determine if the collection browser allows for multi-selectionbooleanisSortable(java.lang.String attributeQualifier)Checks whether provided attribute is sortablevoidnotifyHyperlinkClicked(java.lang.Object value)Notifies that an user has clicked on element hyperlink.voidnotifyItemClicked(java.lang.Object item)Notifies that an user has clicked on element, but did not select it.voidnotifyItemsSelected(java.util.Collection<?> items)Notifies that multiple items have been selected.voidsort(SortData sortData)Reads data sorted with provided parameters
-
-
-
Method Detail
-
getSelectedItems
<E> java.util.Collection<E> getSelectedItems()
Gets all currently selected items- Type Parameters:
E- type of expected items- Returns:
- collection of all selected items
-
getFocusedItem
<E> E getFocusedItem()
Gets currently focused item ornullif no item is focused- Type Parameters:
E- type of expected item- Returns:
- focused item
-
notifyItemsSelected
void notifyItemsSelected(java.util.Collection<?> items)
Notifies that multiple items have been selected.
Method should be called when selection is changed passing a full collection of selected items (even if a single element is added to selection, whole selection should be passed).
- Parameters:
items- all items that are selected
-
areHyperlinksSupported
boolean areHyperlinksSupported()
Informs if collection browser supports hyperlinks.
Values in collection browser may be rendered in the way, that some
- Returns:
-
notifyHyperlinkClicked
void notifyHyperlinkClicked(java.lang.Object value)
Notifies that an user has clicked on element hyperlink.
Call will be ignored, if hyperlinks are not supported
- Parameters:
value- hyperlink's value- See Also:
areHyperlinksSupported()
-
notifyItemClicked
void notifyItemClicked(java.lang.Object item)
Notifies that an user has clicked on element, but did not select it.
- Parameters:
item- item that is represented by clicked element- See Also:
notifyItemsSelected(Collection)
-
getWidgetInstanceManager
WidgetInstanceManager getWidgetInstanceManager()
Returns the widget instance manager of current controller.- Returns:
- widget instance manager
-
isSortable
boolean isSortable(java.lang.String attributeQualifier)
Checks whether provided attribute is sortable- Parameters:
attributeQualifier- attributes qualifier- Returns:
trueif attribute is sortable
-
getCurrentPage
SinglePage getCurrentPage()
- Returns:
- currently loaded data page
-
sort
void sort(SortData sortData)
Reads data sorted with provided parameters- Parameters:
sortData- sorting parameters
-
getCurrentType
DataType getCurrentType()
Gets data type that is currently being displayed- Returns:
- currently selected data type or
nullif selected type code does not match any of types - See Also:
getCurrentTypeCode()
-
getCurrentTypeCode
java.lang.String getCurrentTypeCode()
Gets data type code that is currently being displayed- Returns:
- currently selected data type code
- See Also:
getCurrentType()
-
isMultiSelectEnabled
boolean isMultiSelectEnabled()
Allows to determine if the collection browser allows for multi-selection- Returns:
- true if the collection browser allows for multi-selection
-
getDragAndDropStrategy
DragAndDropStrategy getDragAndDropStrategy()
-
isDragEnabled
boolean isDragEnabled()
-
isDropEnabled
boolean isDropEnabled()
-
-