Class CmsGalleriesTab
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
org.opencms.ade.galleries.client.ui.A_CmsTab
org.opencms.ade.galleries.client.ui.A_CmsListTab
org.opencms.ade.galleries.client.ui.CmsGalleriesTab
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.logical.shared.ValueChangeHandler<String>
,com.google.gwt.event.shared.EventHandler
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsRenderable
,com.google.gwt.user.client.ui.IsWidget
,I_CmsTruncable
Provides the widget for the galleries(folder) tab.
It displays the available gallery folders in the given order.
- Since:
- 8.0.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
A class which generates list items incrementally to fill the galleries tab.protected class
Command for adding more list items to the list of publish items.protected class
A class which generates tree items incrementally to fill the galleries tab.Nested classes/interfaces inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
A_CmsListTab.A_SelectionHandler, A_CmsListTab.SelectHandler
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final int
The batch size for adding new elements to the tab.The labels to display for groups.protected Iterator<CmsTreeItem>
An iterator which produces new list items which should be added to the tab.protected org.opencms.ade.galleries.shared.CmsGalleryGroup
The group of the gallery folder list item that was last rendered.List of selected galleries.Fields inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
DIALOG_CSS, m_infoLabel, m_list, m_options, m_quickSearch, m_scrollList, m_searchButton, m_sortSelectBox, m_tab
Fields inherited from class org.opencms.ade.galleries.client.ui.A_CmsTab
m_tabTextAccessor
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addChildren
(CmsTreeItem parent, List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> children, List<String> selectedGalleries) Adds children to the gallery tree and select the galleries.protected CmsTreeItem
createTreeItem
(org.opencms.ade.galleries.shared.CmsGalleryFolderBean galleryInfo, List<String> selectedGalleries, boolean forTree, boolean useGroups) Creates a tree item widget used in list and tree view of this tab.void
fillContent
(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleryInfos, List<String> selectedGalleries, boolean grouped) Fill the content of the galleries tab panel.protected String
getGroupName
(org.opencms.ade.galleries.shared.CmsGalleryGroup group) Gets the label to display for a group.getParamPanels
(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj) Returns the search parameters to display within the result tab.protected LinkedHashMap<String,
String> Returns a list with sort values for this tab.protected CmsGalleriesTabHandler
Returns the tab handler.protected boolean
Returns if this tab has quick filter enabled.boolean
Returns the value of the "loading" flag, which indicates whether new elements are currently being added into the galleries tab.protected void
Adds more gallery list items to display in the tab, if available.void
Will be triggered when a tab is selected.void
setLoading
(boolean loading) Sets the "loading" flag.void
uncheckGalleries
(List<String> galleries) De-selects the galleries in the galleries list.void
updateListContent
(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleries, List<String> selectedGalleries, boolean useGroups) Update the galleries list.void
updateTreeContent
(List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> galleryTreeEntries, List<String> selectedGalleries) Update the galleries tree.Methods inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
addWidgetToFrontOfList, addWidgetToList, addWidgetToOptions, cancelQuickFilterTimer, checkQuickSearchStatus, clearList, createCustomUploadButton, createNewExternalLinkButton, createOptimizeButton, createScrollList, createSelectBox, createSelectButton, createSelectResourceButton, createUploadButtonForTarget, getList, getRequiredHeight, hasQuickSearch, init, onContentChange, onResize, onValueChange, quickSearch, scheduleQuickFilterTimer, searchTreeItem, setSortSelectBoxValue, truncate
Methods inherited from class org.opencms.ade.galleries.client.ui.A_CmsTab
clearParams, getTabId, isSelected, onDeselection, removeParam, setTabTextAccessor
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Field Details
-
LOAD_BATCH_SIZE
The batch size for adding new elements to the tab.- See Also:
-
m_groupLabels
The labels to display for groups. -
m_itemIterator
An iterator which produces new list items which should be added to the tab. -
m_lastGroup
The group of the gallery folder list item that was last rendered. -
m_selectedGalleries
List of selected galleries.
-
-
Constructor Details
-
CmsGalleriesTab
Constructor.- Parameters:
tabHandler
- the tab handler
-
-
Method Details
-
fillContent
public void fillContent(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleryInfos, List<String> selectedGalleries, boolean grouped) Fill the content of the galleries tab panel.- Parameters:
galleryInfos
- the gallery info beansselectedGalleries
- the list of galleries to selectgrouped
- true if the items should be broken into groups
-
isLoading
Returns the value of the "loading" flag, which indicates whether new elements are currently being added into the galleries tab.- Returns:
- the "loading" flag
-
onSelection
Description copied from class:A_CmsTab
Will be triggered when a tab is selected.- Overrides:
onSelection
in classA_CmsTab
- See Also:
-
setLoading
Sets the "loading" flag.- Parameters:
loading
- the new value of the loading flag
-
uncheckGalleries
De-selects the galleries in the galleries list.- Parameters:
galleries
- the galleries to deselect
-
updateListContent
public void updateListContent(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleries, List<String> selectedGalleries, boolean useGroups) Update the galleries list.- Parameters:
galleries
- the new gallery listselectedGalleries
- the list of galleries to selectuseGroups
- true if the galleries should be broken into groups (this assumes the galleries have already been sorted correctly)
-
updateTreeContent
public void updateTreeContent(List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> galleryTreeEntries, List<String> selectedGalleries) Update the galleries tree.- Parameters:
galleryTreeEntries
- the new gallery tree listselectedGalleries
- the list of galleries to select
-
addChildren
protected void addChildren(CmsTreeItem parent, List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> children, List<String> selectedGalleries) Adds children to the gallery tree and select the galleries.- Parameters:
parent
- the parent itemchildren
- the list of childrenselectedGalleries
- the list of galleries to select
-
getSortList
Description copied from class:A_CmsListTab
Returns a list with sort values for this tab.- Specified by:
getSortList
in classA_CmsListTab
- Returns:
- list of sort order value/text pairs
- See Also:
-
getTabHandler
Description copied from class:A_CmsTab
Returns the tab handler.- Specified by:
getTabHandler
in classA_CmsTab
- Returns:
- the tab handler
- See Also:
-
hasQuickFilter
Description copied from class:A_CmsListTab
Returns if this tab has quick filter enabled.- Overrides:
hasQuickFilter
in classA_CmsListTab
- Returns:
true
if this tab has quick filter enabled- See Also:
-
loadMoreItems
Adds more gallery list items to display in the tab, if available.
-