コード例 #1
0
  public boolean execute(PlugInContext context) throws Exception {
    reportNothingToUndoYet(context);
    layer = (Layer) context.getSelectedLayer(0);
    saveDatasetDialog.setLayer(layer);
    saveDatasetDialog.setVisible(true);

    return saveDatasetDialog.wasOKPressed();
  }
コード例 #2
0
  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);
  }
コード例 #3
0
 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);
 }