Class CmsResultsTab
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.CmsResultsTab
- 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 results tab.
It displays the selected search parameter, the sort order and the search results for the current search.
- Since:
- 8.0.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classScroll handler which executes an action when the user has scrolled to the bottom.classClick-handler for the delete button.static enumEnum representing different options for the results tab.protected classSpecial click handler to use with preview button.classBar containing the search scope selection and a text search field.protected classSpecial click handler to use with select button.Nested classes/interfaces inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
A_CmsListTab.A_SelectionHandlerNested 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
FieldsModifier and TypeFieldDescriptionprotected CmsResultsBackwardsScrollHandlerThe handler for scrolling to the top of the scroll panel.protected booleanStores the information if more results in the search object are available.protected CmsResultListItemThe result list item which corresponds to a preset value in the editor.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_tabFields inherited from class org.opencms.ade.galleries.client.ui.A_CmsTab
m_tabTextAccessorFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionCmsResultsTab(CmsResultsTabHandler tabHandler, CmsDNDHandler dndHandler, I_CmsGalleryHandler galleryHandler, org.opencms.ade.galleries.shared.CmsGallerySearchScope scope, org.opencms.ade.galleries.shared.CmsGallerySearchScope defaultScope) The constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchBean) Appends the list items for the search results from a search bean.protected voidaddContentItems(List<org.opencms.ade.galleries.shared.CmsResultItemBean> list, boolean front, boolean showPath) Adds list items for a list of search results.protected voidaddSingleResult(org.opencms.ade.galleries.shared.CmsResultItemBean resultItem, boolean front, boolean showPath) Adds a list item for a single search result.protected voidClears the list panel.voidClears all search parameters.voidfillContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, List<CmsSearchParamPanel> paramPanels) Fill the content of the results tab.Returns the drag and drop handler.getParamPanels(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj) Returns the search parameters to display within the result tab.intReturns the height required by this tab.protected LinkedHashMap<String, String> Returns a list with sort values for this tab.protected CmsResultsTabHandlerReturns the tab handler.protected booleanReturns if this tab has quick filter enabled.static booleanisImagelikeType(String typeName) Checks if the type is viewable as an image in the gallery result tab.makeDeleteHandler(String resourcePath) Returns the delete handler.voidonResize()Adjust content when outer dimensions are changed.voidRemoves the no params message.voidRemoves the query.voidRemoves the scope.protected voidScrolls to the result which corresponds to a preset value in the editor.protected voidsetScrollPosition(int pos) Helper for setting the scroll position of the scroll panel.voidUpdates the height (with border) of the result list panel according to the search parameter panels shown.Methods inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
addWidgetToFrontOfList, addWidgetToList, addWidgetToOptions, cancelQuickFilterTimer, checkQuickSearchStatus, createCustomUploadButton, createNewExternalLinkButton, createOptimizeButton, createScrollList, createSelectBox, createSelectButton, createSelectResourceButton, createUploadButtonForTarget, getList, hasQuickSearch, init, onContentChange, onValueChange, quickSearch, scheduleQuickFilterTimer, searchTreeItem, setSortSelectBoxValue, truncateMethods inherited from class org.opencms.ade.galleries.client.ui.A_CmsTab
getTabId, isSelected, onDeselection, onSelection, removeParam, setTabTextAccessorMethods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidgetMethods 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, unsinkEventsMethods 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
-
m_backwardScrollHandler
The handler for scrolling to the top of the scroll panel. -
m_hasMoreResults
Stores the information if more results in the search object are available. -
m_preset
The result list item which corresponds to a preset value in the editor.
-
-
Constructor Details
-
Method Details
-
isImagelikeType
Checks if the type is viewable as an image in the gallery result tab.- Parameters:
typeName- the type to check- Returns:
- true if the type can be viewed as an image in the result tab
-
clearParams
Clears all search parameters.- Overrides:
clearParamsin classA_CmsTab
-
getDNDHandler
Returns the drag and drop handler.- Returns:
- the drag and drop handler
-
getRequiredHeight
Description copied from class:A_CmsTabReturns the height required by this tab.- Overrides:
getRequiredHeightin classA_CmsListTab- Returns:
- the height
- See Also:
-
makeDeleteHandler
Returns the delete handler.- Parameters:
resourcePath- the resource path of the resource- Returns:
- the delete handler
-
onResize
Description copied from class:A_CmsTabAdjust content when outer dimensions are changed.- Overrides:
onResizein classA_CmsListTab- See Also:
-
removeNoParamMessage
Removes the no params message. -
removeQuery
Removes the query. -
removeScope
Removes the scope. -
updateListSize
Updates the height (with border) of the result list panel according to the search parameter panels shown. -
addContentItems
protected void addContentItems(List<org.opencms.ade.galleries.shared.CmsResultItemBean> list, boolean front, boolean showPath) Adds list items for a list of search results.- Parameters:
list- the list of search resultsfront- if true, list items will be added to the front of the list, else at the backshowPath-trueto show the resource path in sub title
-
clearList
Description copied from class:A_CmsListTabClears the list panel.- Overrides:
clearListin classA_CmsListTab- See Also:
-
getSortList
Description copied from class:A_CmsListTabReturns a list with sort values for this tab.- Specified by:
getSortListin classA_CmsListTab- Returns:
- list of sort order value/text pairs
- See Also:
-
getTabHandler
Description copied from class:A_CmsTabReturns the tab handler.- Specified by:
getTabHandlerin classA_CmsTab- Returns:
- the tab handler
- See Also:
-
hasQuickFilter
Description copied from class:A_CmsListTabReturns if this tab has quick filter enabled.- Overrides:
hasQuickFilterin classA_CmsListTab- Returns:
trueif this tab has quick filter enabled- See Also:
-
scrollToPreset
Scrolls to the result which corresponds to a preset value in the editor. -
setScrollPosition
Helper for setting the scroll position of the scroll panel.- Parameters:
pos- the scroll position
-