public boolean execute(PlugInContext context) throws Exception { reportNothingToUndoYet(context); layer = (Layer) context.getSelectedLayer(0); saveDatasetDialog.setLayer(layer); saveDatasetDialog.setVisible(true); return saveDatasetDialog.wasOKPressed(); }
public void run(TaskMonitor monitor, PlugInContext context) throws Exception { if (!saveDatasetDialog.wasOKPressed()) { return; } AbstractOutputDriver outputDriver = (AbstractOutputDriver) saveDatasetDialog.getCurrentDriver(); monitor.report("Saving " + layer.getName() + "..."); outputDriver.output(layer); }
public void initialize(PlugInContext context) throws Exception { saveDatasetDialog = new DriverDialog( GeopistaFunctionUtils.getFrame(context.getWorkbenchGuiComponent()), "Save Dataset", true); saveDatasetDialog.initialize(context.getDriverManager().getOutputDrivers()); GUIUtil.centreOnWindow(saveDatasetDialog); }