halo.userinterface.gui.tools
Class JPEGFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by halo.userinterface.gui.tools.JPEGFilter

public class JPEGFilter
extends javax.swing.filechooser.FileFilter

File filter that accepts only jpg files

Author:
Stefanie Kaufmann

Constructor Summary
JPEGFilter()
          Generates a new filter, initializes the list of accepted endings
 
Method Summary
 boolean accept(java.io.File f)
          Tests if a given file is accepted
 void addEnding(java.lang.String ending)
          Adds an accepted ending to the list
 java.util.ArrayList<java.lang.String> getAcceptedEndings()
          Returns the list of accepted endings
 java.lang.String getDescription()
          Returns the description of the filter
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPEGFilter

public JPEGFilter()
Generates a new filter, initializes the list of accepted endings

Method Detail

addEnding

public void addEnding(java.lang.String ending)
Adds an accepted ending to the list

Parameters:
ending - The file ending that is also accepted

accept

public boolean accept(java.io.File f)
Tests if a given file is accepted

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - File that will be tested
Returns:
True if file is accepted

getDescription

public java.lang.String getDescription()
Returns the description of the filter

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
The description of the filter

getAcceptedEndings

public java.util.ArrayList<java.lang.String> getAcceptedEndings()
Returns the list of accepted endings

Returns:
The list of accepted endings