public final class GUITools extends Object
| Modifier and Type | Field and Description | 
|---|---|
private static String | 
ALL_TYPES
String to use for "all types" combination filter. 
 | 
| Modifier | Constructor and Description | 
|---|---|
private  | 
GUITools()  | 
| Modifier and Type | Method and Description | 
|---|---|
static JFileChooser | 
buildFileChooser(FileFilter[] filters)
Builds a file chooser with the given file filters,
 as well as an "All supported file types" combo filter. 
 | 
static JFileChooser | 
buildFileChooser(FileFilter[] filters,
                boolean preview)
Builds a file chooser with the given file filters, as well as an "All
 supported file types" combo filter, if one is not already specified. 
 | 
static JFileChooser | 
buildFileChooser(IFormatHandler handler)
Constructs a file chooser for the given file format handler. 
 | 
static JFileChooser | 
buildFileChooser(IFormatHandler handler,
                boolean preview)
Constructs a file chooser for the given file format handler. 
 | 
static FileFilter[] | 
buildFileFilters(IFormatHandler handler)
Constructs a list of file filters for the given file format handler. 
 | 
private static FileFilter | 
makeComboFilter(FileFilter[] filters)
Creates an "All supported file types" combo filter
 encompassing all of the given filters. 
 | 
private static void | 
shuffleAllTypesToFront(FileFilter[] filters)
Looks for an "All supported file types" combo filter
 and shuffles it to the front of the list. 
 | 
private static FileFilter[] | 
sortFilters(FileFilter[] filters)
Sorts the given list of file filters, keeping the "All supported
 file types" combo filter (if any) at the front of the list. 
 | 
private static FileFilter[] | 
sortFilters(Vector filterList)
Sorts the given list of file filters, keeping the "All supported
 file types" combo filter (if any) at the front of the list. 
 | 
private static final String ALL_TYPES
public static FileFilter[] buildFileFilters(IFormatHandler handler)
public static JFileChooser buildFileChooser(IFormatHandler handler)
public static JFileChooser buildFileChooser(IFormatHandler handler, boolean preview)
public static JFileChooser buildFileChooser(FileFilter[] filters)
public static JFileChooser buildFileChooser(FileFilter[] filters, boolean preview)
preview - If set, chooser has a preview pane showing a
   thumbnail and other information for the selected file.private static FileFilter makeComboFilter(FileFilter[] filters)
private static FileFilter[] sortFilters(FileFilter[] filters)
private static FileFilter[] sortFilters(Vector filterList)
private static void shuffleAllTypesToFront(FileFilter[] filters)
Copyright © 2015 Open Microscopy Environment