Class CmsResultsTab

  • All Implemented Interfaces:,<java.lang.String>,,,,,,, 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.

    • 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.

        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.

        typeName - the type to check
        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.

        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.

        resourcePath - the resource path of the resource
        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.

        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.

        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.

        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.

        pos - the scroll position