org.opencms.applet.upload
Class WebFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.opencms.applet.upload.WebFilter

public class WebFilter
extends javax.swing.filechooser.FileFilter

Filter for fileselector box, filters html files.

Filetypes returned by this filter are html, htm, shtml, xml, xhtml, js, css and txt. Based on the Java 1.4 example.

Since:
6.2.4

Field Summary
static java.lang.String FILTER_ID
          Constant for pre selection.
 
Constructor Summary
WebFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          Accept all directories and all html, htm, shtml, xml, xhtml, js, css and txt.
 java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_ID

public static final java.lang.String FILTER_ID
Constant for pre selection.

See Also:
Constant Field Values
Constructor Detail

WebFilter

public WebFilter()
Method Detail

accept

public boolean accept(java.io.File f)
Accept all directories and all html, htm, shtml, xml, xhtml, js, css and txt.

Specified by:
accept in class javax.swing.filechooser.FileFilter
See Also:
FileFilter.accept(java.io.File)

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter
See Also:
FileFilter.getDescription()