Class CmsVfsTab

  • 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 CmsVfsTab
    extends A_CmsListTab
    The tab widget for selecting folders from the VFS tree.

    Since:
    8.0.0
    • Constructor Detail

      • CmsVfsTab

        public CmsVfsTab​(CmsVfsTabHandler tabHandler,
                         boolean includeFiles)
        Constructor.

        Parameters:
        tabHandler - the tab handler
        includeFiles - the include files flag
    • Method Detail

      • checkFolders

        public void checkFolders​(java.util.Set<java.lang.String> folders)
        Checks the check boxes for the selected folders.

        Parameters:
        folders - the folders for which to check the check boxes
      • fillInitially

        public void fillInitially​(java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean> entries)
        Sets the initial folders in the VFS tab.

        Parameters:
        entries - the root folders to display
      • fillInitially

        public void fillInitially​(java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean> entries,
                                  java.lang.String selectedSiteRoot)
        Sets the initial folders in the VFS tab.

        Parameters:
        entries - the root folders to display
        selectedSiteRoot - site root that should be selected in the select box
      • isInitialized

        public boolean isInitialized()
        Checks if the tab is initialized.

        Returns:
        true if the tab is initialized
      • onReceiveVfsPreloadData

        public void onReceiveVfsPreloadData​(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsPreloadData)
        This method is called when the VFS tree preload data is received.

        Parameters:
        vfsPreloadData - the VFS tree preload data
      • uncheckFolders

        public void uncheckFolders​(java.util.Collection<java.lang.String> folders)
        Un-checks the check boxes for each folder passed in the folders parameter.

        Parameters:
        folders - the folders for which the check boxes should be unchecked
      • clear

        protected void clear()
        Clears the contents of the tab and resets the mapping from tree items to VFS beans.

      • createItem

        protected CmsLazyTreeItem createItem​(org.opencms.ade.galleries.shared.CmsVfsEntryBean vfsEntry)
        Helper method for creating a VFS tree item widget from a VFS entry bean.

        Parameters:
        vfsEntry - the VFS entry bean
        Returns:
        the tree item widget
      • isIncludeFiles

        protected boolean isIncludeFiles()
        Returns if files are included.

        Returns:
        true if files are included