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
Modifier and TypeClassDescriptionprotected class
Scroll handler which executes an action when the user has scrolled to the bottom.class
Click-handler for the delete button.static enum
Enum representing different options for the results tab.protected class
Special click handler to use with preview button.class
Bar containing the search scope selection and a text search field.protected class
Special click handler to use with select button.Nested classes/interfaces inherited from class org.opencms.ade.galleries.client.ui.A_CmsListTab
A_CmsListTab.A_SelectionHandler
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 CmsResultsBackwardsScrollHandler
The handler for scrolling to the top of the scroll panel.protected boolean
Stores the information if more results in the search object are available.protected CmsResultListItem
The 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_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
ConstructorDescriptionCmsResultsTab
(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 void
addContent
(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchBean) Appends the list items for the search results from a search bean.protected void
addContentItems
(List<org.opencms.ade.galleries.shared.CmsResultItemBean> list, boolean front, boolean showPath) Adds list items for a list of search results.protected void
addSingleResult
(org.opencms.ade.galleries.shared.CmsResultItemBean resultItem, boolean front, boolean showPath) Adds a list item for a single search result.protected void
Clears the list panel.void
Clears all search parameters.void
fillContent
(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.int
Returns the height required by this tab.protected LinkedHashMap<String,
String> Returns a list with sort values for this tab.protected CmsResultsTabHandler
Returns the tab handler.protected boolean
Returns if this tab has quick filter enabled.static boolean
isImagelikeType
(String typeName) Checks if the type is viewable as an image in the gallery result tab.makeDeleteHandler
(String resourcePath) Returns the delete handler.void
onResize()
Adjust content when outer dimensions are changed.void
Removes the no params message.void
Removes the query.void
Removes the scope.protected void
Scrolls to the result which corresponds to a preset value in the editor.protected void
setScrollPosition
(int pos) Helper for setting the scroll position of the scroll panel.void
Updates 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, truncate
Methods inherited from class org.opencms.ade.galleries.client.ui.A_CmsTab
getTabId, isSelected, onDeselection, onSelection, 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
-
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:
clearParams
in classA_CmsTab
-
getDNDHandler
Returns the drag and drop handler.- Returns:
- the drag and drop handler
-
getRequiredHeight
Description copied from class:A_CmsTab
Returns the height required by this tab.- Overrides:
getRequiredHeight
in 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_CmsTab
Adjust content when outer dimensions are changed.- Overrides:
onResize
in 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
-true
to show the resource path in sub title
-
clearList
Description copied from class:A_CmsListTab
Clears the list panel.- Overrides:
clearList
in classA_CmsListTab
- See Also:
-
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:
-
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
-