Module java.desktop

Class BasicFileChooserUI.BasicFileView

    • Constructor Detail

      • BasicFileView

        public BasicFileView​()
        Constructs a BasicFileView.
    • Method Detail

      • clearIconCache

        public void clearIconCache​()
        Clears the icon cache.
      • getName

        public String getName​(File f)
        The name of the file. Normally this would be simply f.getName().
        Overrides:
        getName in class FileView
        Parameters:
        f - a File object
        Returns:
        a String representing the name of the file
      • getDescription

        public String getDescription​(File f)
        A human readable description of the file. For example, a file named jag.jpg might have a description that read: "A JPEG image file of James Gosling's face".
        Overrides:
        getDescription in class FileView
        Parameters:
        f - a File object
        Returns:
        a String containing a description of the file or null if it is not available.
      • getTypeDescription

        public String getTypeDescription​(File f)
        A human readable description of the type of the file. For example, a jpg file might have a type description of: "A JPEG Compressed Image File"
        Overrides:
        getTypeDescription in class FileView
        Parameters:
        f - a File object
        Returns:
        a String containing a description of the type of the file or null if it is not available .
      • getCachedIcon

        public Icon getCachedIcon​(File f)
        Returns the cached icon for the file.
        Parameters:
        f - the file
        Returns:
        the cached icon for the file
      • cacheIcon

        public void cacheIcon​(File f,
                              Icon i)
        Caches an icon for a file.
        Parameters:
        f - the file
        i - the icon
      • getIcon

        public Icon getIcon​(File f)
        The icon that represents this file in the JFileChooser.
        Overrides:
        getIcon in class FileView
        Parameters:
        f - a File object
        Returns:
        an Icon which represents the specified File or null if it is not available.
      • isHidden

        public Boolean isHidden​(File f)
        Returns whether or not a file is hidden.
        Parameters:
        f - the file
        Returns:
        whether or not a file is hidden