TrueZIP 6.8.2

de.schlichtherle.io.swing
Class FilterFileSystemView

java.lang.Object
  extended by javax.swing.filechooser.FileSystemView
      extended by de.schlichtherle.io.swing.FilterFileSystemView
Direct Known Subclasses:
FileSystemView

abstract class FilterFileSystemView
extends FileSystemView

An abstract decorator which simply delegates to another instance of FileSystemView. Subclasses should override individual methods to implement specific behaviour. Note that this class does not override any methods in Object - this should be done in subclasses.

Version:
$Id: FilterFileSystemView.java 06f3ba684701 2010/11/04 01:15:55 christian $
Author:
Christian Schlichtherle

Field Summary
private  FileSystemView delegate
          The file system view to be decorated - never null.
 
Constructor Summary
protected FilterFileSystemView(FileSystemView delegate)
          Creates a new decorating file system view.
 
Method Summary
 File createFileObject(File dir, String filename)
           
 File createFileObject(String path)
           
protected  File createFileSystemRoot(File f)
          Forwards the call to createFileSystemRootImpl(java.io.File).
 File createFileSystemRootImpl(File f)
          Creates a new File object for f with correct behavior for a file system root directory.
 File createNewFolder(File containingDir)
           
 File getChild(File parent, String fileName)
           
 File getDefaultDirectory()
           
 FileSystemView getDelegate()
          Returns the file system view to be decorated - never null.
 File[] getFiles(File dir, boolean useFileHiding)
           
 File getHomeDirectory()
           
 File getParentDirectory(File dir)
           
 File[] getRoots()
           
 String getSystemDisplayName(File f)
           
 Icon getSystemIcon(File f)
           
 String getSystemTypeDescription(File f)
           
 boolean isComputerNode(File dir)
           
 boolean isDrive(File dir)
           
 boolean isFileSystem(File f)
           
 boolean isFileSystemRoot(File dir)
           
 boolean isFloppyDrive(File dir)
           
 boolean isHiddenFile(File f)
           
 boolean isParent(File folder, File file)
           
 boolean isRoot(File f)
           
 Boolean isTraversable(File f)
           
 void setDelegate(FileSystemView delegate)
          Sets the file system view to be decorated.
 
Methods inherited from class javax.swing.filechooser.FileSystemView
getFileSystemView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

private FileSystemView delegate
The file system view to be decorated - never null.

Constructor Detail

FilterFileSystemView

protected FilterFileSystemView(FileSystemView delegate)
Creates a new decorating file system view.

Parameters:
delegate - The file view to be decorated - may be null.
Method Detail

getDelegate

public FileSystemView getDelegate()
Returns the file system view to be decorated - never null.


setDelegate

public void setDelegate(FileSystemView delegate)
Sets the file system view to be decorated.

Throws:
NullPointerException - If delegate is null.
IllegalArgumentException - If delegate is this instance.

isRoot

public boolean isRoot(File f)
Overrides:
isRoot in class FileSystemView

isTraversable

public Boolean isTraversable(File f)
Overrides:
isTraversable in class FileSystemView

getSystemDisplayName

public String getSystemDisplayName(File f)
Overrides:
getSystemDisplayName in class FileSystemView

getSystemTypeDescription

public String getSystemTypeDescription(File f)
Overrides:
getSystemTypeDescription in class FileSystemView

getSystemIcon

public Icon getSystemIcon(File f)
Overrides:
getSystemIcon in class FileSystemView

isParent

public boolean isParent(File folder,
                        File file)
Overrides:
isParent in class FileSystemView

getChild

public File getChild(File parent,
                     String fileName)
Overrides:
getChild in class FileSystemView

isFileSystem

public boolean isFileSystem(File f)
Overrides:
isFileSystem in class FileSystemView

createNewFolder

public File createNewFolder(File containingDir)
                     throws IOException
Specified by:
createNewFolder in class FileSystemView
Throws:
IOException

isHiddenFile

public boolean isHiddenFile(File f)
Overrides:
isHiddenFile in class FileSystemView

isFileSystemRoot

public boolean isFileSystemRoot(File dir)
Overrides:
isFileSystemRoot in class FileSystemView

isDrive

public boolean isDrive(File dir)
Overrides:
isDrive in class FileSystemView

isFloppyDrive

public boolean isFloppyDrive(File dir)
Overrides:
isFloppyDrive in class FileSystemView

isComputerNode

public boolean isComputerNode(File dir)
Overrides:
isComputerNode in class FileSystemView

getRoots

public File[] getRoots()
Overrides:
getRoots in class FileSystemView

getHomeDirectory

public File getHomeDirectory()
Overrides:
getHomeDirectory in class FileSystemView

getDefaultDirectory

public File getDefaultDirectory()
Overrides:
getDefaultDirectory in class FileSystemView

createFileObject

public File createFileObject(File dir,
                             String filename)
Overrides:
createFileObject in class FileSystemView

createFileObject

public File createFileObject(String path)
Overrides:
createFileObject in class FileSystemView

getFiles

public File[] getFiles(File dir,
                       boolean useFileHiding)
Overrides:
getFiles in class FileSystemView

getParentDirectory

public File getParentDirectory(File dir)
Overrides:
getParentDirectory in class FileSystemView

createFileSystemRoot

protected final File createFileSystemRoot(File f)
Forwards the call to createFileSystemRootImpl(java.io.File).

Overrides:
createFileSystemRoot in class FileSystemView

createFileSystemRootImpl

public File createFileSystemRootImpl(File f)
Creates a new File object for f with correct behavior for a file system root directory. If the delegate is an instance of this class, then this method forwards the call to the delegate like all other methods in this class. Otherwise, the super class implementation of the method FileSystemView.createFileSystemRoot(java.io.File) is called.


TrueZIP 6.8.2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.