Examples of GridPanel


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

    // else
    // this.resourceSelectionComboBox.setModel(new DefaultComboBoxModel(initHostNameList()));
    // }

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

        // reinitHostComboBox();
        // this.resourceSelectionLabel = new XBayaLabel("Select a Compute Resource", this.resourceSelectionComboBox);
        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.gfacUrlListField = new JComboBox();
//        XBayaLabel gfacURLLabel = new XBayaLabel("GFac URL", this.gfacUrlListField);
        this.interactChkBox = new JCheckBox();
        this.interactChkBox.setSelected(false);
        XBayaLabel interactLabel = new XBayaLabel("Enable Service Interactions", this.interactChkBox);

      chkRunWithCrossProduct=new JCheckBox();
      XBayaLabel crossProductLabel = new XBayaLabel("Execute in cross product", chkRunWithCrossProduct);

        GridPanel infoPanel = new GridPanel();
        // infoPanel.add(this.resourceSelectionLabel);
        // infoPanel.add(this.resourceSelectionComboBox);
        infoPanel.add(instanceNameLabel);
        infoPanel.add(this.instanceNameTextField);
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
//        infoPanel.add(gfacURLLabel);
//        infoPanel.add(this.gfacUrlListField);
        infoPanel.add(interactLabel);
        infoPanel.add(this.interactChkBox);
        infoPanel.add(crossProductLabel);
        infoPanel.add(chkRunWithCrossProduct);
       
        infoPanel.layout(5, 2, GridPanel.WEIGHT_NONE, 1);

        GridPanel mainPanel = new GridPanel();
        mainPanel.add(this.parameterPanel);
        mainPanel.add(infoPanel);
        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

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

        this.inputLocationOnS3TextField.setText("s3n://xbaya-ec2-test/input/");
        this.outputLocationOnS3TextField.setText("s3n://xbaya-ec2-test/output/");
        this.jarFilePathOnS3TextField.setText("s3n://xbaya-ec2-test/jars/Hadoopv400.jar");
        this.mainClassNameTextField.setText("edu.indiana.extreme.HadoopRayTracer");

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(accessKeyIDLabel);
        infoPanel.add(this.accessKeyIDTextField);
        infoPanel.add(secretAccessKeyLabel);
        infoPanel.add(this.secretAccessKeyTextField);
        infoPanel.add(keyPairNameLabel);
        infoPanel.add(this.keyPairNameTextField);
        infoPanel.add(numOfInstancesLabel);
        infoPanel.add(this.numOfInstancesTextField);
        infoPanel.add(jobFlowNameLabel);
        infoPanel.add(this.jobFlowNameTextField);
        infoPanel.add(logLocationOnS3Label);
        infoPanel.add(this.logLocationOnS3TextField);
        infoPanel.add(inputLocationOnS3Label);
        infoPanel.add(this.inputLocationOnS3TextField);
        infoPanel.add(outputLocationOnS3Label);
        infoPanel.add(this.outputLocationOnS3TextField);
        infoPanel.add(jarFilePathOnS3Label);
        infoPanel.add(this.jarFilePathOnS3TextField);
        infoPanel.add(mainClassNameLabel);
        infoPanel.add(this.mainClassNameTextField);

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

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

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

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

        this.messageTextArea = new XBayaTextArea();
        this.messageTextArea.setSize(500, 500);
        this.messageTextArea.setEditable(false);
        XBayaLabel messageLabel = new XBayaLabel(EventDataRepository.Column.MESSAGE.getName(), this.messageTextArea);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(timeLabel);
        infoPanel.add(this.timeTextField);
        infoPanel.add(idLabel);
        infoPanel.add(this.idTextField);
        infoPanel.add(statusLabel);
        infoPanel.add(this.statusTextField);
        infoPanel.add(messageLabel);
        infoPanel.add(this.messageTextArea);
        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

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

        saveHostDescription();
        close();
    }

    private GridPanel createPanelWithMessage(String message){
      GridPanel gridPanel = new GridPanel();
      JLabel lblMessage = new JLabel(message, SwingConstants.CENTER);
    gridPanel.add(lblMessage);
    lblMessage.setFont(new Font("Tahoma", Font.ITALIC, 11));
      gridPanel.layout(1,1, 0,0);
      return gridPanel;
    }
View Full Code Here

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

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

//        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

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

        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

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

      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

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

    private void initGUI() {
        setTitle("HPC Configuration Options");
        setModal(true);
        setBounds(100, 100, 500, 500);
        setLocationRelativeTo(null);
        GridPanel buttonPane = new GridPanel();
        okButton = new JButton("Update");
        okButton.setActionCommand("OK");
        okButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (saveApplicationDescriptionAdvancedOptions()){
                  close();
                }
            }
        });
        getRootPane().setDefaultButton(okButton);
   
        JButton cancelButton = new JButton("Cancel");
        cancelButton.setActionCommand("Cancel");
        cancelButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                close();
            }
        });
           
       
      GridPanel panel = new GridPanel();
    txtProjectAccountNumber = new XBayaTextField();
    txtProjectAccountDescription = new XBayaTextField();

        txtQueueType = new XBayaTextField();
        txtMaxWallTime = new XBayaTextField();
        txtMinMemory = new XBayaTextField();
        txtMaxMemory = new XBayaTextField();
        txtCpuCount = new XBayaTextField();
        txtProcessorsPerNode = new XBayaTextField();
        txtNodeCount = new XBayaTextField();

        DefaultComboBoxModel cmbModelJobType = new DefaultComboBoxModel(getJobTypesAsStrings());
    cmbJobType = new XBayaComboBox(cmbModelJobType);
        cmbJobType.setEditable(false);
        //FIXME:: Machines like trestles are mandating to have cpu and node types set. So better to have these enabled.
//        cmbJobType.getSwingComponent().addActionListener(new ActionListener(){
//      @Override
//      public void actionPerformed(ActionEvent arg0) {
//        boolean disabled=cmbJobType.getText().equalsIgnoreCase(JobTypeType.SERIAL.toString()) || cmbJobType.getText().equalsIgnoreCase(JobTypeType.SINGLE.toString());
//        txtCpuCount.setEnabled(!disabled);
//        txtProcessorsPerNode.setEnabled(!disabled);
//        lblCpuCount.getSwingComponent().setEnabled(!disabled);
//        lblProcessorPerNode.getSwingComponent().setEnabled(!disabled);
//      }
//        });
       
    XBayaLabel lbljobType = new XBayaLabel("Job Type",cmbJobType);
    XBayaLabel lblProjectAccountNumber = new XBayaLabel("Project Account Number *",txtProjectAccountNumber);
    XBayaLabel lblProjectAccountDescription = new XBayaLabel("Project Account Description",txtProjectAccountDescription);
        XBayaLabel lblQueueType = new XBayaLabel("Queue Type *",txtQueueType);
    XBayaLabel lblMaxWallTime = new XBayaLabel("Max Wall Time",txtMaxWallTime);
    lblCpuCount = new XBayaLabel("CPU Count",txtCpuCount);
    lblProcessorPerNode = new XBayaLabel("Processor Per Node", txtProcessorsPerNode);
    XBayaLabel lblMinMemory = new XBayaLabel("Min Memory",txtMinMemory);
    XBayaLabel lblMaxMemory = new XBayaLabel("Max Memory",txtMaxMemory);
        lbNodeCount = new XBayaLabel("Node Count", txtNodeCount);

    panel.add(lbljobType);
    panel.add(cmbJobType);
    panel.add(lblProjectAccountNumber);
    panel.add(txtProjectAccountNumber);
    panel.add(lblProjectAccountDescription);
    panel.add(txtProjectAccountDescription);
    panel.add(lblQueueType);
    panel.add(txtQueueType);
        panel.add(lblMaxWallTime);
    panel.add(txtMaxWallTime);
        panel.add(lblCpuCount);
    panel.add(txtCpuCount);
        panel.add(lbNodeCount);
        panel.add(txtNodeCount);
        panel.add(lblProcessorPerNode);
    panel.add(txtProcessorsPerNode);
        panel.add(lblMinMemory);
    panel.add(txtMinMemory);
        panel.add(lblMaxMemory);
        panel.add(txtMaxMemory);
    panel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        buttonPane.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());

        SwingUtil.layoutToGrid(panel.getSwingComponent(), 10, 2, SwingUtil.WEIGHT_NONE, 1);
       
        buttonPane.add(okButton);
        buttonPane.add(cancelButton);
       
        getContentPane().add(panel.getSwingComponent());
        getContentPane().add(buttonPane.getSwingComponent());
        SwingUtil.layoutToGrid(getContentPane(), 2, 1, 0, 0);
        setResizable(true);
        getRootPane().setDefaultButton(okButton);
    }
View Full Code Here

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

              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
TOP
Copyright © 2018 www.massapi.com. 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.