Package adams.gui.chooser
Class ExtensionFileFilterWithClass
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- adams.gui.core.ExtensionFileFilter
-
- adams.gui.chooser.ExtensionFileFilterWithClass
-
- All Implemented Interfaces:
Serializable
,Comparable<ExtensionFileFilter>
public class ExtensionFileFilterWithClass extends ExtensionFileFilter
A custom filter class that stores the associated class along the description and extensions.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_Classname
the classname.-
Fields inherited from class adams.gui.core.ExtensionFileFilter
EXT_ALL_FILES, m_CaseSensitive, m_Description, m_Extensions
-
-
Constructor Summary
Constructors Constructor Description ExtensionFileFilterWithClass(String classname)
Constructs a filter that matches all files.ExtensionFileFilterWithClass(String classname, String description, String extension)
Constructs a filter that matches files with the given extension, not case-sensitive.ExtensionFileFilterWithClass(String classname, String description, String[] extensions)
Constructs a filter that matches files with the given extension, not case-sensitive.ExtensionFileFilterWithClass(String classname, String description, String[] extensions, boolean caseSensitive)
Constructs a filter that matches files with the given extension, not case-sensitive.ExtensionFileFilterWithClass(String classname, String description, String extension, boolean caseSensitive)
Constructs a filter that matches files with the given extension, not case-sensitive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ExtensionFileFilter o)
Compares this image format with the specified filter for order.String
getClassname()
Returns the associated classname.-
Methods inherited from class adams.gui.core.ExtensionFileFilter
accept, equals, getCommandLineFileFilter, getCsvFileFilter, getDescription, getExtensions, getFlowFileFilter, getLogFileFilter, getModelFileFilter, getPdfFileFilter, getPropertiesFileFilter, getSerializedModelFileFilter, getTextFileFilter, getZipFileFilter, isCaseSensitive, toString
-
-
-
-
Field Detail
-
m_Classname
protected String m_Classname
the classname.
-
-
Constructor Detail
-
ExtensionFileFilterWithClass
public ExtensionFileFilterWithClass(String classname)
Constructs a filter that matches all files.- Parameters:
classname
- the classname this filter is for
-
ExtensionFileFilterWithClass
public ExtensionFileFilterWithClass(String classname, String description, String extension)
Constructs a filter that matches files with the given extension, not case-sensitive.- Parameters:
classname
- the classname this filter is fordescription
- the display stringextension
- the extensions of the files (no dot!)
-
ExtensionFileFilterWithClass
public ExtensionFileFilterWithClass(String classname, String description, String[] extensions)
Constructs a filter that matches files with the given extension, not case-sensitive.- Parameters:
classname
- the classname this filter is fordescription
- the display stringextensions
- the extensions of the files (no dot!)
-
ExtensionFileFilterWithClass
public ExtensionFileFilterWithClass(String classname, String description, String extension, boolean caseSensitive)
Constructs a filter that matches files with the given extension, not case-sensitive.- Parameters:
classname
- the classname this filter is fordescription
- the display stringextension
- the extensions of the files (no dot!)caseSensitive
- if true then the filter is case-sensitive
-
ExtensionFileFilterWithClass
public ExtensionFileFilterWithClass(String classname, String description, String[] extensions, boolean caseSensitive)
Constructs a filter that matches files with the given extension, not case-sensitive.- Parameters:
classname
- the classname this filter is fordescription
- the display stringextensions
- the extensions of the files (no dot!)caseSensitive
- if true then the filter is case-sensitive
-
-
Method Detail
-
getClassname
public String getClassname()
Returns the associated classname.- Returns:
- the classname
-
compareTo
public int compareTo(ExtensionFileFilter o)
Compares this image format with the specified filter for order. Returns a negative integer, zero, or a positive integer as this filter is less than, equal to, or greater than the specified filter.- Specified by:
compareTo
in interfaceComparable<ExtensionFileFilter>
- Overrides:
compareTo
in classExtensionFileFilter
- Parameters:
o
- the filter to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
-