Package org.apache.airavata.xbaya.ui.widgets

Examples of org.apache.airavata.xbaya.ui.widgets.GridPanel


        XBayaLabel hostIdLabel = new XBayaLabel("Host ID", this.hostIdTextField);
        XBayaLabel hostAddressLabel = new XBayaLabel("Host Address", this.hostAddressTextField);
        cmbResourceProtocol = new JComboBox(new String[]{REMOTE_PROTOCOL_STR_LOCAL,REMOTE_PROTOCOL_STR_SSH,REMOTE_PROTOCOL_STR_GLOBUS,REMOTE_PROTOCOL_STR_UNICORE,REMOTE_PROTOCOL_STR_AMAZON_EC2, REMOTE_PROTOCOL_STR_HADOOP});
        JLabel lblResourceProtocol = new JLabel("Resource Protocol");
        GridPanel pnlResourceProtocolSelection=new GridPanel();
        pnlResourceProtocolSelection.add(lblResourceProtocol);
        pnlResourceProtocolSelection.add(cmbResourceProtocol);
        pnlResourceProtocolSelection.layout(1, 2, 0, 1);
        cmbResourceProtocol.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                updateRemoteProtocolTypeAndControls();
            }
        });
        hostIdTextField.getSwingComponent().addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent e) {
              updateDialogStatus();
            }
        });
        hostAddressTextField.getSwingComponent().addKeyListener(new KeyAdapter() {
            @Override
            public void keyReleased(KeyEvent e) {
              updateDialogStatus();
            }
        });
        GridPanel infoPanel1 = new GridPanel();
        infoPanel1.add(hostIdLabel);
        infoPanel1.add(this.hostIdTextField);
        infoPanel1.add(hostAddressLabel);
        infoPanel1.add(this.hostAddressTextField);
//        infoPanel1.add(chkGobusHost);
        infoPanel2 = new GridPanel();
        infoPanel2.add(createPanelWithMessage("Initializing..."));
        SwingUtil.layoutToGrid(infoPanel1.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        SwingUtil.layoutToGrid(infoPanel2.getSwingComponent(), 1, 1, SwingUtil.WEIGHT_NONE, 1);

        GridPanel infoPanel = new GridPanel();

        infoPanel.add(infoPanel1);
        infoPanel.add(pnlResourceProtocolSelection);
        infoPanel.add(infoPanel2);
        infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        SwingUtil.layoutToGrid(infoPanel.getSwingComponent(), 3, 1, SwingUtil.WEIGHT_NONE, 0);

        GridPanel buttonPanel = new GridPanel();
        lblError = new JLabel();
        lblError.setForeground(Color.RED);
        buttonPanel.add(lblError);
        okButton = new JButton("Save");
        if (!isNewHost()) {
      okButton.setText("Update");
    }
    okButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ok();
            }
        });

        buttonPanel.add(okButton);

        JButton cancelButton = new JButton("Cancel");
        cancelButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                close();
            }
        });

        buttonPanel.add(cancelButton);
        buttonPanel.layout(1,3,SwingUtil.WEIGHT_NONE,0);
        buttonPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());

        getContentPane().add(infoPanel.getSwingComponent());
        getContentPane().add(buttonPanel.getSwingComponent());

        SwingUtil.layoutToGrid(getContentPane(), 2, 1, 0, 0);

        getRootPane().setDefaultButton(okButton);
        cmbResourceProtocol.setSelectedIndex(0);
View Full Code Here


//        SwingUtil.addPlaceHolder(globusGateKeeperTextField.getSwingComponent(), "[List of globus gate keeper endpoints]");
        updateDialogStatus();
    }

  private GridPanel createGlobusRemoteProtocolPanel() {
    GridPanel globusPanel = new GridPanel();
        if (gridFTPTextField==null) {
      this.gridFTPTextField = new XBayaTextField();
      this.gateKeeperTextField = new XBayaTextField();
      gateKeeperLabel = new XBayaLabel("GRAM Endpoint", this.gateKeeperTextField);
          gridFTPLabel = new XBayaLabel("Grid FTP Endpoint", this.gridFTPTextField);
    }
        globusPanel.add(gateKeeperLabel);
        globusPanel.add(gateKeeperTextField);
        globusPanel.add(gridFTPLabel);
        globusPanel.add(gridFTPTextField);
        SwingUtil.layoutToGrid(globusPanel.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        return globusPanel;
  }
View Full Code Here

        SwingUtil.layoutToGrid(globusPanel.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        return globusPanel;
  }

  private GridPanel createUnicoreRemoteProtocolPanel() {
    GridPanel globusPanel = new GridPanel();
        if (gridFTPTextField==null) {
      this.gridFTPTextField = new XBayaTextField();
      this.gateKeeperTextField = new XBayaTextField();
      gateKeeperLabel = new XBayaLabel("Unicore Endpoint", this.gateKeeperTextField);
          gridFTPLabel = new XBayaLabel("GridFTP Endpoint", this.gridFTPTextField);
    }
        globusPanel.add(gateKeeperLabel);
        globusPanel.add(gateKeeperTextField);
        globusPanel.add(gridFTPLabel);
        globusPanel.add(gridFTPTextField);
        SwingUtil.layoutToGrid(globusPanel.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        return globusPanel;
  }
View Full Code Here

              e1.printStackTrace();
            }
        }
        }
      });
      GridPanel infoPanel=new GridPanel();
        infoPanel.add(pane);
        infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        SwingUtil.layoutToGrid(infoPanel.getSwingComponent(), 1, 1, 0, 0);

        JButton newButton = new JButton("New...");
        newButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              try {
          newDescriptor();
            } catch (AiravataAPIInvocationException e1) {
              engine.getGUI().getErrorWindow().error("Error while creating descriptors", e1);
              e1.printStackTrace();
            }
            }
        });
        descriptorList.addListSelectionListener(new ListSelectionListener(){
      public void valueChanged(ListSelectionEvent e) {
        boolean isSelected=descriptorList.getSelectedIndex()!=-1;
        editButton.setEnabled(isSelected);
        removeButton.setEnabled(isSelected);
      }
         
        });
        editButton = new JButton("Edit...");
        editButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              try {
          editDescriptor();
            } catch (AiravataAPIInvocationException e1) {
              engine.getGUI().getErrorWindow().error("Error while editing descriptor", e1);
              e1.printStackTrace();
            }
            }

        });
        removeButton = new JButton("Remove");
        removeButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              try {
          deleteDescriptor();
            } catch (AiravataAPIInvocationException e1) {
              engine.getGUI().getErrorWindow().error("Error while removing descriptor", e1);
              e1.printStackTrace();
            }
            }
        });
        JButton closeButton = new JButton("Close");
        closeButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                hide();
            }
        });
       

        GridPanel buttonPanel = new GridPanel();
        buttonPanel.add(newButton);
        buttonPanel.add(editButton);
        buttonPanel.add(removeButton);
        buttonPanel.add(closeButton);
        buttonPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        String title=null;
        switch (descriptorType){
          case HOST:
            title="Host Descriptions";
            break;
View Full Code Here

        this.parameterPanel.getContentPanel().removeAll();
        this.parameterTextFields.clear();
    }

    private void initGUI() {
        this.parameterPanel = new GridPanel(true);

        this.topicTextField = new XBayaTextField();
        XBayaLabel topicLabel = new XBayaLabel("Notification topic", this.topicTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        infoPanel.layout(1, 1, 0, 0);

        GridPanel mainPanel = new GridPanel();
        mainPanel.add(this.parameterPanel);
        mainPanel.add(infoPanel);
        mainPanel.layout(2, 1, 0, 0);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                execute();
View Full Code Here

        this.parameterPanel.getContentPanel().removeAll();
        this.parameterTextFields.clear();
    }

    private void initGUI() {
        this.parameterPanel = new GridPanel(true);

        this.instanceNameTextField = new XBayaTextField();
        XBayaLabel instanceNameLabel = new XBayaLabel("Experiment name", this.instanceNameTextField);
       
//        this.topicTextField = new XBayaTextField();
//        XBayaLabel topicLabel = new XBayaLabel("Notification topic", this.topicTextField);
//        this.workflowInterpreterTextField = new XBayaTextField();
//        XBayaLabel workflowInterpreterLabel = new XBayaLabel("Workflow Interpreter URL",
//                this.workflowInterpreterTextField);
//        this.RegistryTextField = new XBayaTextField();
//        XBayaLabel RegistryLabel = new XBayaLabel("Registry URL", this.RegistryTextField);
//        this.gfacTextField = new XBayaTextField();
//        XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(instanceNameLabel);
        infoPanel.add(this.instanceNameTextField);
//        infoPanel.add(topicLabel);
//        infoPanel.add(this.topicTextField);
//        infoPanel.add(workflowInterpreterLabel);
//        infoPanel.add(this.workflowInterpreterTextField);
//        infoPanel.add(gfacLabel);
//        infoPanel.add(this.gfacTextField);
//        infoPanel.add(RegistryLabel);
//        infoPanel.add(this.RegistryTextField);

        infoPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);

        GridPanel mainPanel = new GridPanel();
        mainPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
        mainPanel.add(infoPanel);
        mainPanel.add(this.parameterPanel);
        mainPanel.layout(2, 1, 0, 0);

        JButton okButton = new JButton("Run");
        okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                execute();
View Full Code Here

//            public void actionPerformed(ActionEvent e) {
////                createNewUser();
//            }
//        });

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(serviceTypeLabel);
        infoPanel.add(this.serviceTypeCombo);
        infoPanel.add(serverAddressLabel);
        infoPanel.add(this.serverTextField);
        infoPanel.add(serverPortLabel);
        infoPanel.add(this.portTextField);
        infoPanel.add(gatewayNameLabel);
        infoPanel.add(this.gatewayNameTextField);
        infoPanel.add(gatewayUserLabel);
        infoPanel.add(this.usernameTextField);
        infoPanel.layout(5, 2, GridPanel.WEIGHT_NONE, 1);
//        infoPanel.layout(2, 2, GridPanel.WEIGHT_NONE, 1);

        infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());

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

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

        GridPanel buttonPanel = new GridPanel();
        buttonPanel.add(okButton);
        buttonPanel.add(cancelButton);
        buttonPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());

        this.dialog = new XBayaDialog(this.engine.getGUI(), "Configure Airavata Registry", infoPanel, buttonPanel);
        this.dialog.setDefaultButton(okButton);
    }
View Full Code Here

        this.wsdlTextArea = new XBayaTextArea();
        this.wsdlTextArea.setEditable(false);
        XBayaLabel wsdlLabel = new XBayaLabel("WSDL", this.wsdlTextArea);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(nameLabel);
        infoPanel.add(this.nameTextField);
        infoPanel.add(idLabel);
        infoPanel.add(this.idTextField);
        infoPanel.add(typeLabel);
        infoPanel.add(this.typeTextField);
        infoPanel.add(wsdlLabel);
        infoPanel.add(this.wsdlTextArea);
        infoPanel.layout(4, 2, 3, 1);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                hide();
View Full Code Here

      public void actionPerformed(ActionEvent arg0) {
        setForceFileStagingToWorkDir(chkForceFileStagingToWorkDir.isSelected());
      }
         
        });
        GridPanel buttonPane = new GridPanel();
        {
            GridBagLayout gbl_buttonPane = new GridBagLayout();
            gbl_buttonPane.columnWidths = new int[] { 307, 136, 0 };
            gbl_buttonPane.rowHeights = new int[] { 33, 0 };
            gbl_buttonPane.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
            gbl_buttonPane.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
           

            lblError = new JLabel("");
            lblError.setForeground(Color.RED);
            GridBagConstraints gbc_lblError = new GridBagConstraints();
            gbc_lblError.insets = new Insets(0, 0, 0, 5);
            gbc_lblError.gridx = 0;
            gbc_lblError.gridy = 0;
            buttonPane.add(lblError);
            JPanel panel = new JPanel();
            GridBagConstraints gbc_panel = new GridBagConstraints();
            gbc_panel.anchor = GridBagConstraints.NORTHWEST;
            gbc_panel.gridx = 1;
            gbc_panel.gridy = 0;
            buttonPane.add(panel);
            {
              JButton resetButton = new JButton("Reset");
                resetButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                      loadData();
                    }
                });
                panel.add(resetButton);
            }
            {
                okButton = new JButton("Save");
                if (!isNewDescription()){
                  okButton.setText("Update");
                }
                okButton.setEnabled(false);
                okButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        saveServiceDescription();
                        close();
                    }
                });
                panel.add(okButton);
                okButton.setActionCommand("OK");
                getRootPane().setDefaultButton(okButton);
            }
            {
                JButton cancelButton = new JButton("Cancel");
                cancelButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        setServiceCreated(false);
                        close();
                    }
                });
                panel.add(cancelButton);
                cancelButton.setActionCommand("Cancel");
            }
        }
       
        contentPanel.add(lblServiceName);
        contentPanel.add(txtServiceName);
        GridPanel parameterPanel=new GridPanel();
        if (isServiceDescriptionMode()) {
      parameterPanel.add(lblInputParameters);
    }
    if (lblTableParameterNote!=null) {
      parameterPanel.add(lblTableParameterNote);
    }
        parameterPanel.add(scrollPane);
      //        if (isServiceDescriptionMode()){
      parameterPanel.add(btnDeleteParameter);
//        }else{
//            GridPanel parameterOptionPanel=new GridPanel();
//          JButton btnLoadExistingServiceData = new JButton("Bind to parameters in existing service description...");
//          btnLoadExistingServiceData.addActionListener(new ActionListener(){
//        @Override
//        public void actionPerformed(ActionEvent arg0) {
//          bindExistingServiceDescriptionAsParameters();
//        }
//          });
//          parameterOptionPanel.add(btnLoadExistingServiceData);
//          parameterOptionPanel.add(btnDeleteParameter);
//          parameterPanel.add(parameterOptionPanel);
//        }
       
        SwingUtil.layoutToGrid(contentPanel.getSwingComponent(), 1, 2, SwingUtil.WEIGHT_NONE, 1);
//        if (lblTableParameterNote==null){
          SwingUtil.layoutToGrid(parameterPanel.getSwingComponent(), 3, 1, 1, 0);
//        }else{
//          SwingUtil.layoutToGrid(parameterPanel.getSwingComponent(), 4, 1, 2, 0);
//        }
        GridPanel infoPanel = new GridPanel();
        if (isServiceDescriptionMode()) {
      infoPanel.add(contentPanel);
    }
    infoPanel.add(parameterPanel);
        infoPanel.add(chkForceFileStagingToWorkDir);
        if (!isServiceDescriptionMode()) {
      infoPanel.add(contentPanel);
    }
        infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        if (isServiceDescriptionMode()) {
      infoPanel.layout(3, 1, 1, 0);
    }else{
      infoPanel.layout(3, 1, 0, 0);
    }
    getContentPane().add(infoPanel.getSwingComponent());
        getContentPane().add(buttonPane.getSwingComponent());
        buttonPane.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        SwingUtil.layoutToGrid(getContentPane(), 2, 1, 0, 0);
        setResizable(true);
        getRootPane().setDefaultButton(okButton);
View Full Code Here

        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) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.ui.widgets.GridPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.