javax.swing.filechooser
Class UnixFileSystemView
java.lang.Object
javax.swing.filechooser.FileSystemView
javax.swing.filechooser.UnixFileSystemView
- class UnixFileSystemView
- extends FileSystemView
FileSystemView that handles some specific unix-isms.
Method Summary |
File |
createNewFolder(File containingDir)
Creates a new folder with a default folder name. |
boolean |
isComputerNode(File dir)
Used by UI classes to decide whether to display a special icon
for a computer node, e.g. |
boolean |
isDrive(File dir)
Used by UI classes to decide whether to display a special icon
for drives or partitions, e.g. a "hard disk" icon.
|
boolean |
isFileSystemRoot(File dir)
Is dir the root of a tree in the file system, such as a drive
or partition. |
boolean |
isFloppyDrive(File dir)
Used by UI classes to decide whether to display a special icon
for a floppy disk. |
Methods inherited from class javax.swing.filechooser.FileSystemView |
createFileObject, createFileObject, createFileSystemRoot, getChild, getDefaultDirectory, getFiles, getFileSystemView, getHomeDirectory, getParentDirectory, getRoots, getShellFolder, getSystemDisplayName, getSystemIcon, getSystemTypeDescription, isFileSystem, isHiddenFile, isParent, isRoot, isTraversable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newFolderString
private static final String newFolderString
newFolderNextString
private static final String newFolderNextString
UnixFileSystemView
UnixFileSystemView()
createNewFolder
public File createNewFolder(File containingDir)
throws IOException
- Creates a new folder with a default folder name.
- Specified by:
createNewFolder
in class FileSystemView
- Throws:
IOException
isFileSystemRoot
public boolean isFileSystemRoot(File dir)
- Description copied from class:
FileSystemView
- Is dir the root of a tree in the file system, such as a drive
or partition. Example: Returns true for "C:\" on Windows 98.
- Overrides:
isFileSystemRoot
in class FileSystemView
- Returns:
true
if f
is a root of a filesystem- See Also:
FileSystemView.isRoot(java.io.File)
isDrive
public boolean isDrive(File dir)
- Description copied from class:
FileSystemView
- Used by UI classes to decide whether to display a special icon
for drives or partitions, e.g. a "hard disk" icon.
The default implementation has no way of knowing, so always returns false.
- Overrides:
isDrive
in class FileSystemView
- Parameters:
dir
- a directory
- Returns:
false
always
isFloppyDrive
public boolean isFloppyDrive(File dir)
- Description copied from class:
FileSystemView
- Used by UI classes to decide whether to display a special icon
for a floppy disk. Implies isDrive(dir).
The default implementation has no way of knowing, so always returns false.
- Overrides:
isFloppyDrive
in class FileSystemView
- Parameters:
dir
- a directory
- Returns:
false
always
isComputerNode
public boolean isComputerNode(File dir)
- Description copied from class:
FileSystemView
- Used by UI classes to decide whether to display a special icon
for a computer node, e.g. "My Computer" or a network server.
The default implementation has no way of knowing, so always returns false.
- Overrides:
isComputerNode
in class FileSystemView
- Parameters:
dir
- a directory
- Returns:
false
always