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

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


        XBayaLabel passphraseLabel = new XBayaLabel("Passphrase", this.passphraseField);

        this.lifetimeField = new XBayaTextField();
        XBayaLabel lifetimeLabel = new XBayaLabel("Lifetime", this.lifetimeField);

        GridPanel mainPanel = new GridPanel();
        mainPanel.add(hostLabel);
        mainPanel.add(this.serverField);
        mainPanel.add(portLabel);
        mainPanel.add(this.portField);
        mainPanel.add(userLabel);
        mainPanel.add(this.usernameField);
        mainPanel.add(passphraseLabel);
        mainPanel.add(this.passphraseField);
        mainPanel.add(lifetimeLabel);
        mainPanel.add(this.lifetimeField);
        mainPanel.layout(5, 2, GridPanel.WEIGHT_NONE, 1);

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


    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) {
                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();

        DefaultComboBoxModel cmbModelJobType = new DefaultComboBoxModel(getJobTypesAsStrings());
    cmbJobType = new XBayaComboBox(cmbModelJobType);
        cmbJobType.setEditable(false);
        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);

    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(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(), 9, 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

        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);

        this.gfacTextField = new XBayaTextField();
        XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);

        /*
         * extend
         */
        this.gridchemBridgeTextField = new XBayaTextField();
        this.usernameTextField = new XBayaTextField();
        XBayaLabel gridchemBridgeLabel = new XBayaLabel("GridChem Bridge URL", this.gridchemBridgeTextField);
        XBayaLabel usernameLabel = new XBayaLabel("Username", this.usernameTextField);

        // default value
        gridchemBridgeTextField.setText("http://129.79.49.227:8080/ogce-gridchem-bridge/");

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        infoPanel.add(gfacLabel);
        infoPanel.add(this.gfacTextField);

        /*
         * extend
         */
        infoPanel.add(gridchemBridgeLabel);
        infoPanel.add(this.gridchemBridgeTextField);
        infoPanel.add(usernameLabel);
        infoPanel.add(this.usernameTextField);
        infoPanel.layout(4, 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("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(RegistryLabel);
        infoPanel.add(this.RegistryTextField);
        infoPanel.add(gfacLabel);
        infoPanel.add(this.gfacTextField);

        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

                    }
                }
            }
        });
        JScrollPane pane = new JScrollPane(editorPane);
        GridPanel gridPanel = new GridPanel();
        XBayaTextField txtKey=new XBayaTextField(key);
        txtKey.getTextField().setEditable(false);
        gridPanel.add(txtKey);
        gridPanel.add(pane);
        gridPanel.getContentPanel().setBorder(BorderFactory.createEtchedBorder());
        gridPanel.layout(2, 1, 1, 0);
       
        JPanel buttonPanel = new JPanel();
        JButton okButton = new JButton("Close");
        okButton.setDefaultCapable(true);
        okButton.addActionListener(new AbstractAction() {
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);

        this.gfacTextField = new XBayaTextField();
        XBayaLabel gfacLabel = new XBayaLabel("GFac URL", this.gfacTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        infoPanel.add(gfacLabel);
        infoPanel.add(this.gfacTextField);
        infoPanel.layout(2, 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("OK");
        okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                execute();
View Full Code Here

    private void setGridFTPEPR(String epr) {
        ((GlobusHostType)hostDescription.getType()).addGridFTPEndPoint(epr);
    }
   
    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

        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_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() {
            @Override
            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.globusGateKeeperTextField = new XBayaTextField();
      globusGateKeeperLabel = new XBayaLabel("GRAM Endpoint", this.globusGateKeeperTextField);       
          gridFTPLabel = new XBayaLabel("Grid FTP Endpoint", this.GridFTPTextField);
    }
        globusPanel.add(globusGateKeeperLabel);
        globusPanel.add(globusGateKeeperTextField);
        globusPanel.add(gridFTPLabel);
        globusPanel.add(GridFTPTextField);
        SwingUtil.layoutToGrid(globusPanel.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        return globusPanel;
  }
View Full Code Here

        this.metadataTextArea = new XBayaTextArea();
        XBayaLabel metadataLabel = new XBayaLabel("Metadata",
                this.metadataTextArea);

        this.gridPanel = new GridPanel();
        this.gridPanel.add(nameLabel);
        this.gridPanel.add(this.nameTextField);
        this.gridPanel.add(descriptionLabel);
        this.gridPanel.add(this.descriptionTextArea);
        this.gridPanel.add(this.valueLabel);
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.