コード例 #1
0
  private void initGUI() {
    BasicTypeMapping.reset();

    this.javaCodeTxtArea = new XBayaTextArea();
    XBayaLabel operationLabel = new XBayaLabel("Operation", this.javaCodeTxtArea);

    GridPanel infoPanel = new GridPanel();
    infoPanel.add(operationLabel);
    infoPanel.add(this.javaCodeTxtArea);
    checkBox = new JCheckBox("Export as webservice");
    infoPanel.add(new XBayaLabel("", checkBox));

    infoPanel.add(checkBox);
    infoPanel.layout(2, 2, 0, 0);

    JButton okButton = new JButton("OK");
    okButton.addActionListener(
        new AbstractAction() {
          public void actionPerformed(ActionEvent e) {

            hide();
          }
        });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);

    this.dialog =
        new XBayaDialog(this.engine.getGUI(), this.node.getName(), infoPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
  }
コード例 #2
0
  /** Initializes the GUI. */
  private void initGui() {
    this.nameTextField = new XBayaTextField();
    this.nameTextField.setEditable(false);
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);

    this.idTextField = new XBayaTextField();
    this.idTextField.setEditable(false);
    XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);

    SpinnerNumberModel model = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1);
    this.numPorts = new JSpinner(model);
    XBayaLabel numPortLabel = new XBayaLabel("Number of Parameters", this.numPorts);

    GridPanel gridPanel = new GridPanel();
    gridPanel.add(nameLabel);
    gridPanel.add(this.nameTextField);
    gridPanel.add(idLabel);
    gridPanel.add(this.idTextField);
    gridPanel.add(numPortLabel);
    gridPanel.add(this.numPorts);
    gridPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);

    JButton okButton = new JButton("OK");
    okButton.addActionListener(
        new AbstractAction() {
          @Override
          public void actionPerformed(ActionEvent e) {
            setInput();
          }
        });

    JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(
        new AbstractAction() {
          @Override
          public void actionPerformed(ActionEvent e) {
            hide();
          }
        });

    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);

    this.dialog = new XBayaDialog(xbayaGUI, "EndDoWhile Configuration", gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
  }