public class DefaultCollectionBrowserContext extends Object implements CollectionBrowserMoldContext
| Modifier and Type | Field and Description |
|---|---|
protected CollectionBrowserController |
controller |
| Constructor and Description |
|---|
DefaultCollectionBrowserContext(CollectionBrowserController controller) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areHyperlinksSupported()
Informs if collection browser supports hyperlinks.
|
SinglePage |
getCurrentPage() |
DataType |
getCurrentType()
Gets data type that is currently being displayed
|
String |
getCurrentTypeCode()
Gets data type code that is currently being displayed
|
DragAndDropStrategy |
getDragAndDropStrategy() |
<E> E |
getFocusedItem()
Gets currently focused item or
null if no item is focused |
<E> Collection<E> |
getSelectedItems()
Gets all currently selected items
|
WidgetInstanceManager |
getWidgetInstanceManager()
Returns the widget instance manager of current controller.
|
boolean |
isMultiSelectEnabled()
Allows to determine if the collection browser allows for multi-selection
|
boolean |
isSortable(String attributeQualifier)
Checks whether provided attribute is sortable
|
void |
notifyHyperlinkClicked(Object value)
Notifies that an user has clicked on element hyperlink.
|
void |
notifyItemClicked(Object item)
Notifies that an user has clicked on element, but did not select it.
|
void |
notifyItemsSelected(Collection<?> items)
Notifies that multiple items have been selected.
|
void |
sort(SortData sortData)
Reads data sorted with provided parameters
|
protected final CollectionBrowserController controller
public DefaultCollectionBrowserContext(CollectionBrowserController controller)
public <E> Collection<E> getSelectedItems()
CollectionBrowserMoldContextgetSelectedItems in interface CollectionBrowserMoldContextE - type of expected itemspublic <E> E getFocusedItem()
CollectionBrowserMoldContextnull if no item is focusedgetFocusedItem in interface CollectionBrowserMoldContextE - type of expected itempublic void notifyItemsSelected(Collection<?> items)
CollectionBrowserMoldContextNotifies 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).
notifyItemsSelected in interface CollectionBrowserMoldContextitems - all items that are selectedpublic boolean areHyperlinksSupported()
CollectionBrowserMoldContextInforms if collection browser supports hyperlinks.
Values in collection browser may be rendered in the way, that some
areHyperlinksSupported in interface CollectionBrowserMoldContextpublic void notifyHyperlinkClicked(Object value)
CollectionBrowserMoldContextNotifies that an user has clicked on element hyperlink.
Call will be ignored, if hyperlinks are not supported
notifyHyperlinkClicked in interface CollectionBrowserMoldContextvalue - hyperlink's valueCollectionBrowserMoldContext.areHyperlinksSupported()public void notifyItemClicked(Object item)
CollectionBrowserMoldContextNotifies that an user has clicked on element, but did not select it.
notifyItemClicked in interface CollectionBrowserMoldContextitem - item that is represented by clicked elementCollectionBrowserMoldContext.notifyItemsSelected(Collection)public WidgetInstanceManager getWidgetInstanceManager()
CollectionBrowserMoldContextgetWidgetInstanceManager in interface CollectionBrowserMoldContextpublic boolean isSortable(String attributeQualifier)
CollectionBrowserMoldContextisSortable in interface CollectionBrowserMoldContextattributeQualifier - attributes qualifiertrue if attribute is sortablepublic SinglePage getCurrentPage()
getCurrentPage in interface CollectionBrowserMoldContextpublic void sort(SortData sortData)
CollectionBrowserMoldContextsort in interface CollectionBrowserMoldContextsortData - sorting parameterspublic DataType getCurrentType()
CollectionBrowserMoldContextgetCurrentType in interface CollectionBrowserMoldContextnull if selected type code does not match any of typesCollectionBrowserMoldContext.getCurrentTypeCode()public String getCurrentTypeCode()
CollectionBrowserMoldContextgetCurrentTypeCode in interface CollectionBrowserMoldContextCollectionBrowserMoldContext.getCurrentType()public boolean isMultiSelectEnabled()
CollectionBrowserMoldContextisMultiSelectEnabled in interface CollectionBrowserMoldContextpublic DragAndDropStrategy getDragAndDropStrategy()
getDragAndDropStrategy in interface CollectionBrowserMoldContextCopyright © 2018. All rights reserved.