/** * Builds a file chooser with the given file filters, * as well as an "All supported file types" combo filter. */ public static JFileChooser buildFileChooser(final FileFilter[] filters) { return buildFileChooser(filters, true); }
/** * Constructs a file chooser for the given file format handler. * If preview flag is set, chooser has an preview pane showing * a thumbnail and other information for the selected file. */ public static JFileChooser buildFileChooser(IFormatHandler handler, boolean preview) { return buildFileChooser(buildFileFilters(handler), preview); }
/** * 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(FileFilter[] filters) { filters = ComboFileFilter.sortFilters(filters); shuffleAllTypesToFront(filters); return filters; }
FileFilter combo = makeComboFilter(sortFilters(comboList)); if (combo != null) filterList.add(combo); filters = sortFilters(filterList); filterList.add(new ExtensionFileFilter(suffixes, format)); filters = sortFilters(filterList);
FileFilter combo = makeComboFilter(sortFilters(comboList)); if (combo != null) filterList.add(combo); filters = sortFilters(filterList); filterList.add(new ExtensionFileFilter(suffixes, format)); filters = sortFilters(filterList);
/** * Builds a file chooser with the given file filters, * as well as an "All supported file types" combo filter. */ public static JFileChooser buildFileChooser(final FileFilter[] filters) { return buildFileChooser(filters, true); }
/** * Constructs a file chooser for the given file format handler. * If preview flag is set, chooser has an preview pane showing * a thumbnail and other information for the selected file. */ public static JFileChooser buildFileChooser(IFormatHandler handler, boolean preview) { return buildFileChooser(buildFileFilters(handler), preview); }
/** * 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) { FileFilter[] filters = ComboFileFilter.sortFilters(filterList); shuffleAllTypesToFront(filters); return filters; }
/** Constructs a file chooser for the given file format handler. */ public static JFileChooser buildFileChooser(IFormatHandler handler) { return buildFileChooser(handler, true); }
/** * 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(FileFilter[] filters) { filters = ComboFileFilter.sortFilters(filters); shuffleAllTypesToFront(filters); return filters; }
/** Constructs a file chooser for the given file format handler. */ public static JFileChooser buildFileChooser(IFormatHandler handler) { return buildFileChooser(handler, true); }
/** * 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) { FileFilter[] filters = ComboFileFilter.sortFilters(filterList); shuffleAllTypesToFront(filters); return filters; }
rc = GUITools.buildFileChooser(swap); wc = GUITools.buildFileChooser(writer);
rc = GUITools.buildFileChooser(swap); wc = GUITools.buildFileChooser(writer);
if ("open".equals(cmd)) { wait(true); JFileChooser chooser = GUITools.buildFileChooser(myReader); wait(false); int rval = chooser.showOpenDialog(this); JFileChooser chooser = GUITools.buildFileChooser(myWriter); wait(false); int rval = chooser.showSaveDialog(this);
if ("open".equals(cmd)) { wait(true); JFileChooser chooser = GUITools.buildFileChooser(myReader); wait(false); int rval = chooser.showOpenDialog(this); JFileChooser chooser = GUITools.buildFileChooser(myWriter); wait(false); int rval = chooser.showSaveDialog(this);
JFileChooser fc = GUITools.buildFileChooser(new ImageWriter(), false); fc.setDialogTitle("Bio-Formats Exporter"); String defaultDir = OpenDialog.getDefaultDirectory();
JFileChooser fc = GUITools.buildFileChooser(new ImageWriter(), false); fc.setDialogTitle("Bio-Formats Exporter"); String defaultDir = OpenDialog.getDefaultDirectory();