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<java.lang.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
public class CmsResultsTab extends A_CmsListTab
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 Classes Modifier and Type Class Description protected class
CmsResultsTab.CmsAsynchronousScrollToBottomHandler
Scroll handler which executes an action when the user has scrolled to the bottom.class
CmsResultsTab.DeleteHandler
Click-handler for the delete button.static class
CmsResultsTab.ParamType
Enum representing different options for the results tab.protected class
CmsResultsTab.PreviewHandler
Special click handler to use with preview button.class
CmsResultsTab.SearchBar
Bar containing the search scope selection and a text search field.protected class
CmsResultsTab.SelectHandler
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
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsResultsBackwardsScrollHandler
m_backwardScrollHandler
The handler for scrolling to the top of the scroll panel.protected boolean
m_hasMoreResults
Stores the information if more results in the search object are available.protected CmsResultListItem
m_preset
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
-
-
Constructor Summary
Constructors Constructor Description CmsResultsTab(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchBean)
Appends the list items for the search results from a search bean.protected void
addContentItems(java.util.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
clearList()
Clears the list panel.void
clearParams()
Clears all search parameters.void
fillContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, java.util.List<CmsSearchParamPanel> paramPanels)
Fill the content of the results tab.CmsDNDHandler
getDNDHandler()
Returns the drag and drop handler.java.util.List<CmsSearchParamPanel>
getParamPanels(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj)
Returns the search parameters to display within the result tab.int
getRequiredHeight()
Returns the height required by this tab.protected java.util.LinkedHashMap<java.lang.String,java.lang.String>
getSortList()
Returns a list with sort values for this tab.protected CmsResultsTabHandler
getTabHandler()
Returns the tab handler.protected boolean
hasQuickFilter()
Returns if this tab has quick filter enabled.static boolean
isImagelikeType(java.lang.String typeName)
Checks if the type is viewable as an image in the gallery result tab.CmsResultsTab.DeleteHandler
makeDeleteHandler(java.lang.String resourcePath)
Returns the delete handler.void
onResize()
Adjust content when outer dimensions are changed.void
removeNoParamMessage()
Removes the no params message.void
removeQuery()
Removes the query.void
removeScope()
Removes the scope.protected void
scrollToPreset()
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
updateListSize()
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, 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 Detail
-
m_backwardScrollHandler
protected CmsResultsBackwardsScrollHandler m_backwardScrollHandler
The handler for scrolling to the top of the scroll panel.
-
m_hasMoreResults
protected boolean m_hasMoreResults
Stores the information if more results in the search object are available.
-
m_preset
protected CmsResultListItem m_preset
The result list item which corresponds to a preset value in the editor.
-
-
Constructor Detail
-
CmsResultsTab
public CmsResultsTab(CmsResultsTabHandler tabHandler, CmsDNDHandler dndHandler, I_CmsGalleryHandler galleryHandler, org.opencms.ade.galleries.shared.CmsGallerySearchScope scope, org.opencms.ade.galleries.shared.CmsGallerySearchScope defaultScope)
The constructor.- Parameters:
tabHandler
- the tab handlerdndHandler
- the dnd managergalleryHandler
- the gallery handlerscope
- the initial scopedefaultScope
- the default scope
-
-
Method Detail
-
isImagelikeType
public static boolean isImagelikeType(java.lang.String typeName)
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
public void clearParams()
Clears all search parameters.- Overrides:
clearParams
in classA_CmsTab
-
fillContent
public void fillContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj, java.util.List<CmsSearchParamPanel> paramPanels)
Fill the content of the results tab.- Parameters:
searchObj
- the current search object containing search resultsparamPanels
- list of search parameter panels to show
-
getDNDHandler
public CmsDNDHandler getDNDHandler()
Returns the drag and drop handler.- Returns:
- the drag and drop handler
-
getParamPanels
public java.util.List<CmsSearchParamPanel> getParamPanels(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchObj)
Description copied from class:A_CmsTab
Returns the search parameters to display within the result tab.- Specified by:
getParamPanels
in classA_CmsTab
- Parameters:
searchObj
- the current search object- Returns:
- the parameter panel
- See Also:
A_CmsTab.getParamPanels(org.opencms.ade.galleries.shared.CmsGallerySearchBean)
-
getRequiredHeight
public int getRequiredHeight()
Description copied from class:A_CmsTab
Returns the height required by this tab.- Overrides:
getRequiredHeight
in classA_CmsListTab
- Returns:
- the height
- See Also:
A_CmsListTab.getRequiredHeight()
-
makeDeleteHandler
public CmsResultsTab.DeleteHandler makeDeleteHandler(java.lang.String resourcePath)
Returns the delete handler.- Parameters:
resourcePath
- the resource path of the resource- Returns:
- the delete handler
-
onResize
public void onResize()
Description copied from class:A_CmsTab
Adjust content when outer dimensions are changed.- Overrides:
onResize
in classA_CmsListTab
- See Also:
A_CmsListTab.onResize()
-
removeNoParamMessage
public void removeNoParamMessage()
Removes the no params message.
-
removeQuery
public void removeQuery()
Removes the query.
-
removeScope
public void removeScope()
Removes the scope.
-
updateListSize
public void updateListSize()
Updates the height (with border) of the result list panel according to the search parameter panels shown.
-
addContent
protected void addContent(org.opencms.ade.galleries.shared.CmsGallerySearchBean searchBean)
Appends the list items for the search results from a search bean.- Parameters:
searchBean
- a search bean containing results
-
addContentItems
protected void addContentItems(java.util.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
-
addSingleResult
protected void addSingleResult(org.opencms.ade.galleries.shared.CmsResultItemBean resultItem, boolean front, boolean showPath)
Adds a list item for a single search result.- Parameters:
resultItem
- the search resultfront
- if true, adds the list item to the front of the list, else at the backshowPath
-true
to show the resource path in sub title
-
clearList
protected void clearList()
Description copied from class:A_CmsListTab
Clears the list panel.- Overrides:
clearList
in classA_CmsListTab
- See Also:
A_CmsListTab.clearList()
-
getSortList
protected java.util.LinkedHashMap<java.lang.String,java.lang.String> 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:
A_CmsListTab.getSortList()
-
getTabHandler
protected CmsResultsTabHandler getTabHandler()
Description copied from class:A_CmsTab
Returns the tab handler.- Specified by:
getTabHandler
in classA_CmsTab
- Returns:
- the tab handler
- See Also:
A_CmsTab.getTabHandler()
-
hasQuickFilter
protected boolean 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:
A_CmsListTab.hasQuickFilter()
-
scrollToPreset
protected void scrollToPreset()
Scrolls to the result which corresponds to a preset value in the editor.
-
setScrollPosition
protected void setScrollPosition(int pos)
Helper for setting the scroll position of the scroll panel.- Parameters:
pos
- the scroll position
-
-