net.aerith.misao.io.filechooser
Class ExtensionBasedFileFilter
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--net.aerith.misao.io.filechooser.ExtensionBasedFileFilter
- Direct Known Subclasses:
- ImageFileFilter, PxfFilter, XmlFilter
- public abstract class ExtensionBasedFileFilter
- extends javax.swing.filechooser.FileFilter
The ExtensionBasedFileFilter
represents a
FileFilter
which selects files based on the file
extension.
Field Summary |
protected boolean |
accept_compressed
True when to accept the compressed files. |
Method Summary |
boolean |
accept(java.io.File file)
Returns true if the specified file is an XML file. |
void |
acceptCompressed(boolean flag)
Sets the flag to accept compressed files when checks the
existence of file. |
abstract java.lang.String[] |
getAcceptableExtensions()
Returns the acceptable extensions. |
java.lang.String |
getTruncatedFilename(java.io.File file)
Gets the file name without extension. |
Methods inherited from class javax.swing.filechooser.FileFilter |
getDescription |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
accept_compressed
protected boolean accept_compressed
- True when to accept the compressed files.
ExtensionBasedFileFilter
public ExtensionBasedFileFilter()
acceptCompressed
public void acceptCompressed(boolean flag)
- Sets the flag to accept compressed files when checks the
existence of file.
- Parameters:
flag
- true when to accept compressed files.
getTruncatedFilename
public java.lang.String getTruncatedFilename(java.io.File file)
- Gets the file name without extension.
- Parameters:
file
- the image file.- Returns:
- the file name without extension.
accept
public boolean accept(java.io.File file)
- Returns true if the specified file is an XML file.
- Overrides:
- accept in class javax.swing.filechooser.FileFilter
- Parameters:
file
- the file to judge.- Returns:
- true if the file is an XML file.
getAcceptableExtensions
public abstract java.lang.String[] getAcceptableExtensions()
- Returns the acceptable extensions.
- Returns:
- the acceptable extensions.