gpt4 book ai didi

net.sf.taverna.zaria.ZBasePane.getElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 11:51:31 25 4
gpt4 key购买 nike

本文整理了Java中net.sf.taverna.zaria.ZBasePane.getElement()方法的一些代码示例,展示了ZBasePane.getElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZBasePane.getElement()方法的具体详情如下:
包路径:net.sf.taverna.zaria.ZBasePane
类名称:ZBasePane
方法名:getElement

ZBasePane.getElement介绍

暂无

代码示例

代码示例来源:origin: uk.org.mygrid.taverna/taverna-workbench

public void modelChanged(String modelName, Object oldModel,
  Object newModel) {
  ((PerspectiveSPI) oldModel).update(basePane.getElement());
  PerspectiveSPI perspective = (PerspectiveSPI) newModel;
  switchPerspective(perspective);
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-workbench

public void actionPerformed(ActionEvent e) {
    JFileChooser chooser = new JFileChooser();
    chooser.setDialogTitle("Save perspective");
    chooser.setFileFilter(new ExtensionFileFilter(
      new String[] { "xml" }));
    int retVal = chooser.showSaveDialog(basePane);
    if (retVal == JFileChooser.APPROVE_OPTION) {
      File file = chooser.getSelectedFile();
      if (file != null) {
        PrintWriter out;
        try {
          out = new PrintWriter(new FileWriter(file));
          Element element = basePane.getElement();
          XMLOutputter xo =
            new XMLOutputter(Format.getPrettyFormat());
          out.print(xo.outputString(element));
          out.flush();
          out.close();
        } catch (IOException ex) {
          logger.error("IOException saving layout", ex);
          JOptionPane.showMessageDialog(basePane,
            "Error saving layout file: " + ex.getMessage());
        }
      }
    }
  }
};

代码示例来源:origin: net.sf.taverna.t2.ui-impl/workbench-impl

public void actionPerformed(ActionEvent e) {
    JFileChooser chooser = new JFileChooser();
    chooser.setDialogTitle("Save perspective");
    chooser.setFileFilter(new ExtensionFileFilter(
        new String[] { "xml" }));
    int retVal = chooser.showSaveDialog(basePane);
    if (retVal == JFileChooser.APPROVE_OPTION) {
      File file = chooser.getSelectedFile();
      if (file != null) {
        PrintWriter out;
        try {
          out = new PrintWriter(new FileWriter(file));
          Element element = basePane.getElement();
          XMLOutputter xo = new XMLOutputter(Format
              .getPrettyFormat());
          out.print(xo.outputString(element));
          out.flush();
          out.close();
        } catch (IOException ex) {
          logger.error("IOException saving layout", ex);
          JOptionPane.showMessageDialog(basePane,
              "Error saving layout file: " + ex.getMessage());
        }
      }
    }
  }
}

代码示例来源:origin: net.sf.taverna.t2.ui-impl/workbench-impl

public void saveAll() throws FileNotFoundException, IOException {
  // update current perspective
  PerspectiveSPI current = (PerspectiveSPI) modelMap
      .getModel(ModelMapConstants.CURRENT_PERSPECTIVE);
  if (current != null) {
    current.update(basePane.getElement());
  }
  CustomPerspectiveFactory.getInstance().saveAll(customPerspectives);
  for (PerspectiveSPI perspective : perspectives.keySet()) {
    if (!(perspective instanceof CustomPerspective)) {
      savePerspective(perspective);
    }
  }
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-workbench

public void saveAll() throws FileNotFoundException, IOException {
  // update current perspective
  PerspectiveSPI current =
    (PerspectiveSPI) modelMap.getNamedModel(ModelMap.CURRENT_PERSPECTIVE);
  if (current != null) {
    current.update(basePane.getElement());
  }
  CustomPerspectiveFactory.getInstance().saveAll(customPerspectives);
  for (PerspectiveSPI perspective : perspectives.keySet()) {
    if (!(perspective instanceof CustomPerspective)) {
      savePerspective(perspective);
    }
  }
}

代码示例来源:origin: uk.org.mygrid.taverna/taverna-workbench

&& currentPerspective instanceof CustomPerspective) {
((CustomPerspective) currentPerspective).update(basePane
    .getElement());

代码示例来源:origin: net.sf.taverna.t2.ui-impl/workbench-impl

public void notify(Observable<ModelMapEvent> sender,
      ModelMapEvent message) throws Exception {
    if (!message.getModelName().equals(
        ModelMapConstants.CURRENT_PERSPECTIVE)) {
      return;
    }
    if (message.getOldModel() instanceof PerspectiveSPI) {
      ((PerspectiveSPI) message.getOldModel()).update(basePane
          .getElement());
    }
    if (message.getNewModel() instanceof PerspectiveSPI) {
      PerspectiveSPI newPerspective = (PerspectiveSPI) message
          .getNewModel();
      switchPerspective(newPerspective);
    }
    if (message instanceof ModelDestroyedEvent
        && message.getOldModel() instanceof CustomPerspective) {
      CustomPerspective customPerspective = (CustomPerspective) message
          .getOldModel();
      removeCustomPerspective(customPerspective);
    }
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com