|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileSystemView
org.argouml.util.osdep.win32.Win32FileSystemView
This class is necessary due to an annoying bug on Windows NT where instantiating a JFileChooser with the default FileSystemView will cause a "drive A: not ready" error every time. I grabbed the Windows FileSystemView impl from the 1.3 SDK and modified it so as to not use java.io.File.listRoots() to get fileSystem roots. java.io.File.listRoots() does a SecurityManager.checkRead() which causes the OS to try to access drive A: even when there is no disk, causing an annoying "abort, retry, ignore" popup message every time we instantiate a JFileChooser! Instead of calling listRoots() we use a straightforward alternate method of getting file system roots.
Nested Class Summary | |
(package private) class |
Win32FileSystemView.FileSystemRoot
|
Field Summary |
Fields inherited from class javax.swing.filechooser.FileSystemView |
|
Constructor Summary | |
Win32FileSystemView()
|
Method Summary | |
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, getDefaultDirectory, getFiles, getFileSystemView, getHomeDirectory, getParentDirectory, getSystemDisplayName, getSystemIcon, getSystemTypeDescription, isComputerNode, isDrive, isFileSystem, isFileSystemRoot, isFloppyDrive, isParent, isTraversable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Win32FileSystemView()
Method Detail |
public boolean isRoot(java.io.File f)
public java.io.File createNewFolder(java.io.File containingDir) throws java.io.IOException
java.io.IOException
public boolean isHiddenFile(java.io.File f)
public java.io.File[] getRoots()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |