Class CmsGalleriesTab

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
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

public class CmsGalleriesTab extends A_CmsListTab
Provides the widget for the galleries(folder) tab.

It displays the available gallery folders in the given order.

Since:
8.0.
  • Field Details

    • LOAD_BATCH_SIZE

      protected static final int LOAD_BATCH_SIZE
      The batch size for adding new elements to the tab.

      See Also:
    • m_groupLabels

      protected Map<org.opencms.ade.galleries.shared.CmsGalleryGroup,String> m_groupLabels
      The labels to display for groups.
    • m_itemIterator

      An iterator which produces new list items which should be added to the tab.

    • m_lastGroup

      protected org.opencms.ade.galleries.shared.CmsGalleryGroup m_lastGroup
      The group of the gallery folder list item that was last rendered.
    • m_selectedGalleries

      List of selected galleries.
  • Constructor Details

  • Method Details

    • fillContent

      public void fillContent(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleryInfos, List<String> selectedGalleries, boolean grouped)
      Fill the content of the galleries tab panel.

      Parameters:
      galleryInfos - the gallery info beans
      selectedGalleries - the list of galleries to select
      grouped - true if the items should be broken into groups
    • getParamPanels

      public 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 class A_CmsTab
      Parameters:
      searchObj - the current search object
      Returns:
      the parameter panel
      See Also:
    • isLoading

      public boolean isLoading()
      Returns the value of the "loading" flag, which indicates whether new elements are currently being added into the galleries tab.

      Returns:
      the "loading" flag
    • onSelection

      public void onSelection()
      Description copied from class: A_CmsTab
      Will be triggered when a tab is selected.

      Overrides:
      onSelection in class A_CmsTab
      See Also:
    • setLoading

      public void setLoading(boolean loading)
      Sets the "loading" flag.

      Parameters:
      loading - the new value of the loading flag
    • uncheckGalleries

      public void uncheckGalleries(List<String> galleries)
      De-selects the galleries in the galleries list.

      Parameters:
      galleries - the galleries to deselect
    • updateListContent

      public void updateListContent(List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> galleries, List<String> selectedGalleries, boolean useGroups)
      Update the galleries list.

      Parameters:
      galleries - the new gallery list
      selectedGalleries - the list of galleries to select
      useGroups - true if the galleries should be broken into groups (this assumes the galleries have already been sorted correctly)
    • updateTreeContent

      public void updateTreeContent(List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> galleryTreeEntries, List<String> selectedGalleries)
      Update the galleries tree.

      Parameters:
      galleryTreeEntries - the new gallery tree list
      selectedGalleries - the list of galleries to select
    • addChildren

      protected void addChildren(CmsTreeItem parent, List<org.opencms.ade.galleries.shared.CmsGalleryTreeEntry> children, List<String> selectedGalleries)
      Adds children to the gallery tree and select the galleries.

      Parameters:
      parent - the parent item
      children - the list of children
      selectedGalleries - the list of galleries to select
    • createTreeItem

      protected CmsTreeItem createTreeItem(org.opencms.ade.galleries.shared.CmsGalleryFolderBean galleryInfo, List<String> selectedGalleries, boolean forTree, boolean useGroups)
      Creates a tree item widget used in list and tree view of this tab.

      Parameters:
      galleryInfo - the gallery folder bean
      selectedGalleries - the selected galleries
      forTree - true if the item is used within tree view
      useGroups - true if the gallery tree items should be broken into groups
      Returns:
      the tree item
    • getGroupName

      protected String getGroupName(org.opencms.ade.galleries.shared.CmsGalleryGroup group)
      Gets the label to display for a group.
      Parameters:
      group - the gallery group
      Returns:
      the label to display for the gallery group
    • getSortList

      Description copied from class: A_CmsListTab
      Returns a list with sort values for this tab.

      Specified by:
      getSortList in class A_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 class A_CmsTab
      Returns:
      the tab handler
      See Also:
    • hasQuickFilter

      protected boolean hasQuickFilter()
      Description copied from class: A_CmsListTab
      Returns if this tab has quick filter enabled.

      Overrides:
      hasQuickFilter in class A_CmsListTab
      Returns:
      true if this tab has quick filter enabled
      See Also:
    • loadMoreItems

      protected void loadMoreItems()
      Adds more gallery list items to display in the tab, if available.