net.sf.jpackit.ui.swing
Class RelativeFileSystemView

java.lang.Object
  extended by javax.swing.filechooser.FileSystemView
      extended by net.sf.jpackit.ui.swing.RelativeFileSystemView

public class RelativeFileSystemView
extends javax.swing.filechooser.FileSystemView

RelativeFileSystemView is needed to restrict user to access filesystem upper than specified root folder.

Author:
Kamil K. Shamgunov

Constructor Summary
RelativeFileSystemView(java.io.File root)
          Creates a new instance of RelativeFileSystemView
 
Method Summary
 java.io.File createNewFolder(java.io.File file)
           
 java.io.File[] getRoots()
           
 
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, isHiddenFile, isParent, isRoot, isTraversable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelativeFileSystemView

public RelativeFileSystemView(java.io.File root)
Creates a new instance of RelativeFileSystemView

Method Detail

createNewFolder

public java.io.File createNewFolder(java.io.File file)
                             throws java.io.IOException
Specified by:
createNewFolder in class javax.swing.filechooser.FileSystemView
Throws:
java.io.IOException

getRoots

public java.io.File[] getRoots()
Overrides:
getRoots in class javax.swing.filechooser.FileSystemView