TrueZIP File* 7.0

de.schlichtherle.truezip.file.swing
Class TDecoratingFileSystemView

java.lang.Object
  extended by javax.swing.filechooser.FileSystemView
      extended by de.schlichtherle.truezip.file.swing.TDecoratingFileSystemView
Direct Known Subclasses:
TFileSystemView

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public abstract class TDecoratingFileSystemView
extends FileSystemView

A decorator for a file system view.

Author:
Christian Schlichtherle

Field Summary
protected  FileSystemView delegate
          The decorated file system view.
 
Constructor Summary
protected TDecoratingFileSystemView(FileSystemView fileSystemView)
          Creates a new decorating file system view.
 
Method Summary
 File createFileObject(File dir, String filename)
           
 File createFileObject(String path)
           
protected  File createFileSystemRoot(File f)
           The implementation in the class TDecoratingFileSystemView determines if the delegate is an instance of this class.
 File createNewFolder(File containingDir)
           
 File getChild(File parent, String fileName)
           
 File getDefaultDirectory()
           
 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)
           
 String toString()
          Returns a string representation of this object for debugging and logging purposes.
 
Methods inherited from class javax.swing.filechooser.FileSystemView
getFileSystemView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

protected final FileSystemView delegate
The decorated file system view.

Constructor Detail

TDecoratingFileSystemView

protected TDecoratingFileSystemView(FileSystemView fileSystemView)
Creates a new decorating file system view.

Parameters:
fileSystemView - the file system view to decorate.
Method Detail

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 File createFileSystemRoot(File f)

The implementation in the class TDecoratingFileSystemView determines if the delegate is an instance of this class. If this is true, then this method forwards the call to the delegate. Otherwise, the implementation of the super class is called.

Overrides:
createFileSystemRoot in class FileSystemView

toString

public String toString()
Returns a string representation of this object for debugging and logging purposes.

Overrides:
toString in class Object

TrueZIP File* 7.0

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