public class TFileSystemView extends TDecoratingFileSystemView
JFileChooser
.
This class is used by TFileTreeCellRenderer
to render files and directories in a TFileTree
.fsv
Constructor and Description |
---|
TFileSystemView() |
TFileSystemView(FileSystemView fileSystemView) |
TFileSystemView(FileSystemView fileSystemView,
TArchiveDetector detector) |
Modifier and Type | Method and Description |
---|---|
File |
createFileObject(File file)
Wraps the given
file in a TFile if its an archive file
or an archive entry. |
File |
createFileObject(File dir,
String filename) |
File |
createFileObject(String path) |
File |
createNewFolder(File parent) |
File |
getChild(File parent,
String child) |
TArchiveDetector |
getDetector()
Returns the nullable archive detector to use.
|
File[] |
getFiles(File dir,
boolean useFileHiding) |
File |
getParentDirectory(File file) |
String |
getSystemDisplayName(File file) |
Icon |
getSystemIcon(File file) |
String |
getSystemTypeDescription(File file) |
boolean |
isComputerNode(File file) |
boolean |
isDrive(File file) |
boolean |
isFileSystem(File file) |
boolean |
isFileSystemRoot(File file) |
boolean |
isFloppyDrive(File file) |
boolean |
isHiddenFile(File file) |
boolean |
isParent(File folder,
File file) |
boolean |
isRoot(File file) |
Boolean |
isTraversable(File file) |
void |
setDetector(TArchiveDetector detector)
Sets the archive detector to use.
|
protected File |
unwrap(File file)
|
protected TFile |
wrap(File file)
Ensures that the returned file object is an instance of
TFile . |
createFileSystemRoot, getDefaultDirectory, getHomeDirectory, getRoots, toString
getFileSystemView
public TFileSystemView()
public TFileSystemView(FileSystemView fileSystemView)
public TFileSystemView(FileSystemView fileSystemView, @CheckForNull TArchiveDetector detector)
public File createFileObject(File file)
file
in a TFile
if its an archive file
or an archive entry.
Otherwise returns the given file
.file
- the file to wrap.file
if it's not an archive file and not an archive
entry, otherwise a TFile
which wraps the given
file
.public File createFileObject(File dir, String filename)
createFileObject
in class TDecoratingFileSystemView
public File createFileObject(String path)
createFileObject
in class TDecoratingFileSystemView
public File createNewFolder(File parent) throws IOException
createNewFolder
in class TDecoratingFileSystemView
IOException
public File getChild(File parent, String child)
getChild
in class TDecoratingFileSystemView
@CheckForNull public TArchiveDetector getDetector()
public File[] getFiles(File dir, boolean useFileHiding)
getFiles
in class TDecoratingFileSystemView
public File getParentDirectory(File file)
getParentDirectory
in class TDecoratingFileSystemView
public String getSystemDisplayName(File file)
getSystemDisplayName
in class TDecoratingFileSystemView
public Icon getSystemIcon(File file)
getSystemIcon
in class TDecoratingFileSystemView
public String getSystemTypeDescription(File file)
getSystemTypeDescription
in class TDecoratingFileSystemView
public boolean isComputerNode(File file)
isComputerNode
in class TDecoratingFileSystemView
public boolean isDrive(File file)
isDrive
in class TDecoratingFileSystemView
public boolean isFileSystem(File file)
isFileSystem
in class TDecoratingFileSystemView
public boolean isFileSystemRoot(File file)
isFileSystemRoot
in class TDecoratingFileSystemView
public boolean isFloppyDrive(File file)
isFloppyDrive
in class TDecoratingFileSystemView
public boolean isHiddenFile(File file)
isHiddenFile
in class TDecoratingFileSystemView
public boolean isParent(File folder, File file)
isParent
in class TDecoratingFileSystemView
public boolean isRoot(File file)
isRoot
in class TDecoratingFileSystemView
public Boolean isTraversable(File file)
isTraversable
in class TDecoratingFileSystemView
public void setDetector(@CheckForNull TArchiveDetector detector)
detector
- the archive detector to use.protected File unwrap(File file)
file
- the file to unwrap.file
is an instance of
TFile
or file
otherwise.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.