< prev index next >

## src/java.desktop/share/classes/sun/awt/shell/ShellFolderManager.java

Print this page

      87             return new File[] { (File)get("fileChooserDefaultFolder") };
      88         }
      89         return null;
      90     }
      91
      92     /**
      93      * Does {@code dir} represent a "computer" such as a node on the network, or
      94      * "My Computer" on the desktop.
      95      */
      96     public boolean isComputerNode(File dir) {
      97         return false;
      98     }
      99
     100     public boolean isFileSystemRoot(File dir) {
     101         if (dir instanceof ShellFolder && !((ShellFolder) dir).isFileSystem()) {
     102             return false;
     103         }
     104         return (dir.getParentFile() == null);
     105     }
     106

     107     protected ShellFolder.Invoker createInvoker() {
     108         return new DirectInvoker();
     109     }
     110
     111     private static class DirectInvoker implements ShellFolder.Invoker {
     112         public <T> T invoke(Callable<T> task) throws Exception {
     113             return task.call();
     114         }
     115     }
     116 }
      87             return new File[] { (File)get("fileChooserDefaultFolder") };
      88         }
      89         return null;
      90     }
      91
      92     /**
      93      * Does {@code dir} represent a "computer" such as a node on the network, or
      94      * "My Computer" on the desktop.
      95      */
      96     public boolean isComputerNode(File dir) {
      97         return false;
      98     }
      99
     100     public boolean isFileSystemRoot(File dir) {
     101         if (dir instanceof ShellFolder && !((ShellFolder) dir).isFileSystem()) {
     102             return false;
     103         }
     104         return (dir.getParentFile() == null);
     105     }
     106
     107     String getPath(File dir) {
     108         return dir.getPath();
     109     }
     110
     111     protected ShellFolder.Invoker createInvoker() {
     112         return new DirectInvoker();
     113     }
     114
     115     private static class DirectInvoker implements ShellFolder.Invoker {
     116         public <T> T invoke(Callable<T> task) throws Exception {
     117             return task.call();
     118         }
     119     }
     120 }

< prev index next >