Class 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.
    • 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 handler
        dndHandler - the dnd manager
        galleryHandler - the gallery handler
        scope - the initial scope
        defaultScope - 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
      • 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 results
        paramPanels - list of search parameter panels to show
      • 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
      • 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 results
        front - if true, list items will be added to the front of the list, else at the back
        showPath - 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 result
        front - if true, adds the list item to the front of the list, else at the back
        showPath - true to show the resource path in sub title
      • 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