userinterface.gui.tools
Class JPEGFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by 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)
           
 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()
           
 
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)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

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

getAcceptedEndings

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

Returns:
The list of accepted endings