PublisherClient
Class PublisherFilter
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--PublisherClient.PublisherFilter
- public class PublisherFilter
- extends javax.swing.filechooser.FileFilter
Filter used by JFileChooser for archive publishing.
Copyright (c) 2000-2001
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- Version:
- 1, 0, 2
- Author:
- Alexis Grandemange
Based on an example of Jeff Dinkins
Method Summary |
boolean |
accept(java.io.File f)
FileFilter method.
|
void |
addExtension(java.lang.String extension)
Adds a filetype "dot" extension to filter against. |
java.lang.String |
getDescription()
FileFilter method.
|
private java.lang.String |
getExtension(java.io.File f)
Service method.
|
void |
setDescription(java.lang.String description)
Sets the human readable description of this filter. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
TYPE_UNKNOWN
private static java.lang.String TYPE_UNKNOWN
HIDDEN_FILE
private static java.lang.String HIDDEN_FILE
filters
private java.util.Hashtable filters
description
private java.lang.String description
fullDescription
private java.lang.String fullDescription
PublisherFilter
public PublisherFilter()
accept
public boolean accept(java.io.File f)
- FileFilter method.
Return true if this file should be shown in the directory pane,
false if it shouldn't.
Files that begin with "." are ignored.
- Overrides:
- accept in class javax.swing.filechooser.FileFilter
- See Also:
getExtension(java.io.File)
getExtension
private java.lang.String getExtension(java.io.File f)
- Service method.
Return the extension portion of the file's name.
addExtension
public void addExtension(java.lang.String extension)
- Adds a filetype "dot" extension to filter against.
getDescription
public java.lang.String getDescription()
- FileFilter method.
Returns the human readable description of this filter. For
example: "JPEG and GIF Image Files (*.jpg, *.gif)"
- Overrides:
- getDescription in class javax.swing.filechooser.FileFilter
setDescription
public void setDescription(java.lang.String description)
- Sets the human readable description of this filter.