/** * Sets the product. * * @param product the product which must not be <code>null</code>, if this is an "Export" file chooser. */ public void setProduct(Product product) { if (_readerPlugIn == null) { Guardian.assertNotNull("product", product); } _product = product; if (_product != null) { setCurrentFilename(_product.getName()); } }
/** * 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(); }
setCurrentFilename("subset_" + getCurrentFilename());