@Override public int showDialog(Component parent, String approveButtonText) { initUI(); clearCurrentSubsetProduct(); updateState(); return super.showDialog(parent, approveButtonText); }
int i = fileChooser.showDialog(parentComponent, null); if (i == SnapFileChooser.APPROVE_OPTION) { selectedFile = fileChooser.getSelectedFile();
int i = fileChooser.showDialog(parentComponent, null); if (i == SnapFileChooser.APPROVE_OPTION) { selectedFile = fileChooser.getSelectedFile();
int i = fileChooser.showDialog(parentComponent, null); if (i == SnapFileChooser.APPROVE_OPTION) { selectedFile = fileChooser.getSelectedFile();
@Override public void actionPerformed(ActionEvent e) { PropertyMap preferences = appContext.getPreferences(); final SnapFileChooser fileChooser = getFileChooser( preferences.getPropertyString(LAST_OPEN_CSV_DIR, SystemUtils.getUserHomeDir().getPath())); int answer = fileChooser.showDialog(parent, "Select"); if (answer == JFileChooser.APPROVE_OPTION) { File selectedFile = fileChooser.getSelectedFile(); preferences.setPropertyString(LAST_OPEN_CSV_DIR, selectedFile.getParent()); try { final List<SimpleFeature> extendedFeatures = PixExOpUtils.extractFeatures(selectedFile); for (SimpleFeature extendedFeature : extendedFeatures) { final GenericPlacemarkDescriptor placemarkDescriptor = new GenericPlacemarkDescriptor( extendedFeature.getFeatureType()); final Placemark placemark = placemarkDescriptor.createPlacemark(extendedFeature); setName(extendedFeature, placemark); setDateTime(extendedFeature, placemark); setPlacemarkGeoPos(extendedFeature, placemark); tableModel.addPlacemark(placemark); } } catch (IOException exception) { appContext.handleError(String.format("Error occurred while reading file: %s \n" + exception.getLocalizedMessage() + "\nPossible reason: Other char separator than tabulator used", selectedFile), exception); } } }