Class TerraFileBrowserSkin

    • Field Detail

      • HOME_DIRECTORY

        public static final java.io.File HOME_DIRECTORY
    • Constructor Detail

      • TerraFileBrowserSkin

        public TerraFileBrowserSkin()
    • Method Detail

      • getFileComparator

        public static TerraFileBrowserSkin.FileComparator getFileComparator​(java.lang.String columnName,
                                                                            SortDirection sortDirection)
        Parameters:
        columnName - The column name to sort on.
        sortDirection - Ascending or Descending sort order.
        Returns:
        A new file comparator for the given column and direction.
      • install

        public void install​(Component component)
        Description copied from class: ComponentSkin
        Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.
        Specified by:
        install in interface Skin
        Overrides:
        install in class FileBrowserSkin
        Parameters:
        component - The component to which the skin is being attached.
      • getPreferredWidth

        public int getPreferredWidth​(int height)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred width given the provided height constraint.
        Specified by:
        getPreferredWidth in interface ConstrainedVisual
        Overrides:
        getPreferredWidth in class ContainerSkin
        Parameters:
        height - The height by which to constrain the preferred width, or -1 for no constraint.
        Returns:
        The preferred width given the height constraint.
      • getPreferredHeight

        public int getPreferredHeight​(int width)
        Description copied from interface: ConstrainedVisual
        Returns the visual's preferred height given the provided width constraint.
        Specified by:
        getPreferredHeight in interface ConstrainedVisual
        Overrides:
        getPreferredHeight in class ContainerSkin
        Parameters:
        width - The width by which to constrain the preferred height, or -1 for no constraint.
        Returns:
        The preferred height given the width constraint.
      • layout

        public void layout()
        Description copied from interface: Skin
        If the component on which the skin is installed is a container, lays out the container's children.
      • getFileAt

        public java.io.File getFileAt​(int x,
                                      int y)
        Description copied from interface: FileBrowser.Skin
        Get the file selection at the given X/Y coordinates.
        Parameters:
        x - The mouse X-position.
        y - The mouse Y-position.
        Returns:
        The file displayed at the given coordinates.
      • isKeyboardFolderTraversalEnabled

        public boolean isKeyboardFolderTraversalEnabled()
      • setKeyboardFolderTraversalEnabled

        public void setKeyboardFolderTraversalEnabled​(boolean keyboardFolderTraversalEnabled)
      • isHideDisabledFiles

        public boolean isHideDisabledFiles()
      • setHideDisabledFiles

        public void setHideDisabledFiles​(boolean hideDisabledFiles)
      • isShowHiddenFiles

        public boolean isShowHiddenFiles()
        Returns:
        Whether hidden files will be shown in the browser.
      • setShowHiddenFiles

        public void setShowHiddenFiles​(boolean showHiddenFiles)
        Set to determine if hidden files should be shown.
        Parameters:
        showHiddenFiles - Whether to show hidden files.
      • rootDirectoryChanged

        public void rootDirectoryChanged​(FileBrowser fileBrowser,
                                         java.io.File previousRootDirectory)
        Description copied from interface: FileBrowserListener
        Called when a file browser's root directory has changed.
        Parameters:
        fileBrowser - The file browser that has changed.
        previousRootDirectory - The previous root directory of the browser.
      • selectedFileAdded

        public void selectedFileAdded​(FileBrowser fileBrowser,
                                      java.io.File file)
        Description copied from interface: FileBrowserListener
        Called when a file has been added to a file browser's selection.
        Parameters:
        fileBrowser - The file browser that has changed.
        file - The newly selected file.
      • selectedFileRemoved

        public void selectedFileRemoved​(FileBrowser fileBrowser,
                                        java.io.File file)
        Description copied from interface: FileBrowserListener
        Called when a file has been removed from a file browser's selection.
        Parameters:
        fileBrowser - The file browser that has changed.
        file - The file that was just unselected.
      • selectedFilesChanged

        public void selectedFilesChanged​(FileBrowser fileBrowser,
                                         Sequence<java.io.File> previousSelectedFiles)
        Description copied from interface: FileBrowserListener
        Called when a file browser's selection state has been reset.
        Parameters:
        fileBrowser - The file browser that has changed.
        previousSelectedFiles - The complete sequence of files that used to be selected.
      • multiSelectChanged

        public void multiSelectChanged​(FileBrowser fileBrowser)
        Description copied from interface: FileBrowserListener
        Called when a file browser's multi-select flag has changed.
        Parameters:
        fileBrowser - The file browser that has changed.
      • disabledFileFilterChanged

        public void disabledFileFilterChanged​(FileBrowser fileBrowser,
                                              Filter<java.io.File> previousDisabledFileFilter)
        Description copied from interface: FileBrowserListener
        Called when a file browser's file filter has changed.
        Parameters:
        fileBrowser - The file browser that has changed.
        previousDisabledFileFilter - The previous disabled file filter.