/** * Constructs an "Export" file chooser with the given title and for the given product. * * @param title the dialog title, must not be <code>null</code> * @param product the product to export, must not be <code>null</code> */ public ProductFileChooser(String title, Product product) { Guardian.assertNotNullOrEmpty("title", title); Guardian.assertNotNull("product", product); setProduct(product); setDialogTitle(title); setFileSelectionMode(JFileChooser.FILES_ONLY); // setAcceptAllFileFilterUsed(true); createUI(); }
/** * Constructs an "Import" file chooser with the given title and the given reader plug-in. * * @param title the dialog title, must not be <code>null</code> * @param readerPlugIn the reader plug-in for a particular product type, must not be <code>null</code> */ public ProductFileChooser(String title, ProductReaderPlugIn readerPlugIn) { Guardian.assertNotNullOrEmpty("title", title); Guardian.assertNotNull("readerPlugIn", readerPlugIn); _readerPlugIn = readerPlugIn; setCurrentFilename("noname"); setDialogTitle(title); setFileSelectionMode(JFileChooser.FILES_ONLY); // setAcceptAllFileFilterUsed(true); addChoosableFileFilter(new BeamFileFilter()); createUI(); }