Class FileNode

    • Field Detail

      • file

        protected java.io.File file
        The file.
      • iconcache

        protected final IIconCache iconcache
        The icon cache.
      • relative

        protected java.lang.String relative
        The relative file name.
      • displayname

        protected java.lang.String displayname
        The cached display name.
      • tostring

        protected java.lang.String tostring
      • lastsiblings

        protected java.util.List lastsiblings
        The last siblings.
    • Method Detail

      • getId

        public java.lang.Object getId()
        Get the id used for lookup.
        Specified by:
        getId in interface ITreeNode
      • refresh

        public void refresh​(boolean recurse)
        Refresh the node.
        Specified by:
        refresh in interface ITreeNode
        Overrides:
        refresh in class AbstractSwingTreeNode
        Parameters:
        recurse - Recursively refresh subnodes, if true.
      • searchChildren

        protected void searchChildren()
        Asynchronously search for children. Should call setChildren() once children are found.
        Specified by:
        searchChildren in class AbstractTreeNode
      • toString

        public java.lang.String toString()
        Create a string representation.
        Overrides:
        toString in class java.lang.Object
      • getDisplayName

        public java.lang.String getDisplayName()
        Get the display name.
      • getFile

        public java.io.File getFile()
        Get the file.
        Returns:
        the file.
      • getRelativePath

        public java.lang.String getRelativePath()
        Get the relative path.
      • convertPathToRelative

        protected static java.lang.String convertPathToRelative​(java.io.File file)
        Get the corresponding relative path for a file. Handles jars specially.
      • getFileName

        public java.lang.String getFileName()
        Get the file name.
        Specified by:
        getFileName in interface IFileNode
      • getFilePath

        public java.lang.String getFilePath()
        Get the file path.
        Specified by:
        getFilePath in interface IFileNode
      • isDirectory

        public boolean isDirectory()
        Check if the file is a directory.
        Specified by:
        isDirectory in interface IFileNode
      • getFileSize

        public long getFileSize()
        Get the file size.
        Specified by:
        getFileSize in interface IFileNode