コード例 #1
0
  @Override
  protected void actionInvoked(final ActionEvent e) {
    modelGraph.save();

    final ModelTabbedContent tabbedContent = modelGraph.getTabbedContent();
    final NodeProcessModel nodeProcessModel = tabbedContent.getTreeNode();
    try {
      final Map<String, Object> kv =
          Application.remote()
              .call(
                  nodeProcessModel.getUrl(),
                  "saveModel",
                  new KVMap()
                      .add("id", nodeProcessModel.getJsonModel().get("id"))
                      .add("doc", tabbedContent.getDocument().toString()));
      if (Application.isError(kv)) {
        return;
      }
    } catch (final IOException ex) {
      SwingUtils.showError(ex);
    }
  }
コード例 #2
0
 public static Window parent() {
   return (Window) Application.get().getMainPane();
 }