Pandora
Class MyFileFilter
- public class MyFileFilter
- extends javax.swing.filechooser.FileFilter
- Class that implements a custom file filter. To construct a new file filter just write: MyFileFilter imageFilter = new MyFileFilter("Generator Files (.pnd , .inet, .topgen )", new String[] { "PND","INET","TOPGEN"});
- Version:
- 0.1
- Author:
- Foudalis Ilias
MyFileFilter
public MyFileFilter(java.lang.String description,
java.lang.String extension)
- Clas constructor.
- Parameters:
description
- String : The name of the file filter.
extension
- String : A string that will contain the extensions.
MyFileFilter
public MyFileFilter(java.lang.String description,
java.lang.String[] extensions)
- Class constructor.
- Parameters:
description
- String : The name of the file filter.
extensions
- String[] : An array of strings that conains the extensions that ara acceptable.
accept
public boolean accept(java.io.File file)
- Method that decides if a file will be accepted or not.
- Parameters:
file
- File
- Returns:
- boolean
getDescription
public java.lang.String getDescription()
- Returns the description of the file filter.
- Returns:
- String : the description of the file filter.
toLower
private void toLower(java.lang.String[] array)
- Converts an array of strings to lowercase.
- Parameters:
array
- String[]