Class WindowsAltFileSystemView


  • class WindowsAltFileSystemView
    extends javax.swing.filechooser.FileSystemView
    Work around FileSystemView implementation bug on the Windows platform. See: Using JFileChooser in WebStart-deployed application
    Version:
    $Id: WindowsAltFileSystemView.java 1831635 2018-05-15 13:33:47Z ssteiner $
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.File createNewFolder​(java.io.File containingDir)
      creates a new folder with a default folder name.
      java.io.File[] getRoots()
      Returns all root partitians on this system.
      boolean isHiddenFile​(java.io.File f)
      Returns whether a file is hidden or not.
      boolean isRoot​(java.io.File f)
      Returns true if the given file is a root.
      • Methods inherited from class javax.swing.filechooser.FileSystemView

        createFileObject, createFileObject, createFileSystemRoot, getChild, getChooserComboBoxFiles, getDefaultDirectory, getFiles, getFileSystemView, getHomeDirectory, getLinkLocation, getParentDirectory, getSystemDisplayName, getSystemIcon, getSystemTypeDescription, isComputerNode, isDrive, isFileSystem, isFileSystemRoot, isFloppyDrive, isLink, isParent, isTraversable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EXCEPTION_CONTAINING_DIR_NULL

        public static final java.lang.String EXCEPTION_CONTAINING_DIR_NULL
        See Also:
        Constant Field Values
      • EXCEPTION_DIRECTORY_ALREADY_EXISTS

        public static final java.lang.String EXCEPTION_DIRECTORY_ALREADY_EXISTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • WindowsAltFileSystemView

        WindowsAltFileSystemView()
    • Method Detail

      • isRoot

        public boolean isRoot​(java.io.File f)
        Returns true if the given file is a root.
        Overrides:
        isRoot in class javax.swing.filechooser.FileSystemView
      • createNewFolder

        public java.io.File createNewFolder​(java.io.File containingDir)
                                     throws java.io.IOException
        creates a new folder with a default folder name.
        Specified by:
        createNewFolder in class javax.swing.filechooser.FileSystemView
        Throws:
        java.io.IOException
      • isHiddenFile

        public boolean isHiddenFile​(java.io.File f)
        Returns whether a file is hidden or not. On Windows there is currently no way to get this information from io.File, therefore always return false.
        Overrides:
        isHiddenFile in class javax.swing.filechooser.FileSystemView
      • getRoots

        public java.io.File[] getRoots()
        Returns all root partitians on this system. On Windows, this will be the A: through Z: drives.
        Overrides:
        getRoots in class javax.swing.filechooser.FileSystemView