de.schlichtherle.io.swing
Class FileView
java.lang.Object
javax.swing.filechooser.FileView
de.schlichtherle.io.swing.FilterFileView
de.schlichtherle.io.swing.FileView
final class FileView
- extends FilterFileView
An archive enabled file view.
This class recognizes instances of the File class and returns
custom icons and type descriptions if it's an archive file or an archive
entry.
Otherwise, the super class behaviour is used.
Note that this class accesses archive files lazily, i.e. it does not
eagerly check the true status with File.isDirectory() or similar
unless really necessary. This is to prevent dead locks between the Event
Dispatch Thread and the Basic L&F File Loading Threads which are forked
by JFileChooser.
- Version:
- $Id: FileView.java 06f3ba684701 2010/11/04 01:15:55 christian $
- Author:
- Christian Schlichtherle
|
Constructor Summary |
FileView(FileView delegate)
Creates a new archive enabled file view. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_NAME
private static final String CLASS_NAME
- See Also:
- Constant Field Values
resources
private static final ResourceBundle resources
FileView
public FileView(FileView delegate)
- Creates a new archive enabled file view.
- Parameters:
delegate - The file view to be decorated - may be null.
getIcon
public Icon getIcon(File file)
- Overrides:
getIcon in class FilterFileView
getTypeDescription
public String getTypeDescription(File file)
- Overrides:
getTypeDescription in class FilterFileView
isTraversable
public Boolean isTraversable(File file)
- Overrides:
isTraversable in class FilterFileView
openIcon
static Icon openIcon(File file)
closedIcon
static Icon closedIcon(File file)
icon
private static Icon icon(File file)
typeDescription
static String typeDescription(File file)
isValidArchive
private static boolean isValidArchive(File file)
createNonArchiveFile
private static File createNonArchiveFile(File file)
isEntryInValidArchive
private static boolean isEntryInValidArchive(File file)
traversable
static Boolean traversable(File file)
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.