com.izforge.izpack.gui
Class AutomatedInstallScriptFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.izforge.izpack.gui.AutomatedInstallScriptFilter

public class AutomatedInstallScriptFilter
extends javax.swing.filechooser.FileFilter

Allows a file if it is a directory or if it ends with .xml. The description is set using the langpack id FinishPanel.automated.dialog.filterdesc

Note:

This file could be replaced in java 1.6 by javax.swing.filechooser.FileNameExtensionFilter, although loading the value from a lang pack would have to use an external reference, so it may be better to keep this class since it has the language pack logic encapsulated.

Author:
J. Chris Folsom

Field Summary
static java.lang.String DEFAULT_DESCRIPTION
          The default description for the file filter if it cannot be loaded from the LocaleDatabase.
static java.lang.String DESCRIPTION_LOCALE_DATABASE_KEY
          This key will be used to search the locale database for the description to display.
 
Constructor Summary
AutomatedInstallScriptFilter()
           
 
Method Summary
 boolean accept(java.io.File pathname)
           
 java.lang.String getDescription()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DESCRIPTION

public static final java.lang.String DEFAULT_DESCRIPTION
The default description for the file filter if it cannot be loaded from the LocaleDatabase.

See Also:
Constant Field Values

DESCRIPTION_LOCALE_DATABASE_KEY

public static final java.lang.String DESCRIPTION_LOCALE_DATABASE_KEY
This key will be used to search the locale database for the description to display. If it cannot be found the default value will be used.

See Also:
Constant Field Values
Constructor Detail

AutomatedInstallScriptFilter

public AutomatedInstallScriptFilter()
Method Detail

accept

public boolean accept(java.io.File pathname)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

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