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

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


    /**
   *
   */
    private void initGui() {

        GridPanel mainPanel = new GridPanel();

        MonitorPanel monitorPanel = new MonitorPanel(this.xbayaGUI, this.nodeID, monitor);
        this.consoleTextArea = new XBayaTextArea();
        XBayaLabel consoleLabel = new XBayaLabel("Console", this.consoleTextArea);

        this.commandField = new XBayaTextField();
        XBayaLabel commandLabel = new XBayaLabel("Command", this.commandField);

        mainPanel.add(monitorPanel);
        mainPanel.add(consoleLabel);
        mainPanel.add(this.consoleTextArea);
        mainPanel.add(commandLabel);
        mainPanel.add(this.commandField);

        mainPanel.layout(5, 1, GridPanel.WEIGHT_NONE, 1);

        JButton sendButton = new JButton("Send");
        sendButton.addActionListener(new AbstractAction() {
            /**
             * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
View Full Code Here


     */
    private void initGUI() {
        this.urlTextField = new XBayaTextField();
        XBayaLabel urlLabel = new XBayaLabel("URL", this.urlTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(urlLabel);
        infoPanel.add(this.urlTextField);
        infoPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);

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

    public ODEInvokerWindow() {

    }

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

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

        // this.xRegistryTextField = new XBayaTextField();
        // XBayaLabel xRegistryLabel = new XBayaLabel("XRegistry URL", this.xRegistryTextField);

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

        this.resourceMappingField = new XBayaTextField();
        XBayaLabel resourceMappingLabel = new XBayaLabel("Resource Mapping (optional)", this.resourceMappingField);

        this.gatekeeperField = new XBayaTextField();
        XBayaLabel gatekeeperLabel = new XBayaLabel("Gatekeeper (optional)", this.gatekeeperField);

        this.jobManagerField = new XBayaTextField();
        XBayaLabel jobMagerLabel = new XBayaLabel("Job Manager (optional)", this.jobManagerField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        // infoPanel.add(xRegistryLabel);
        // infoPanel.add(this.xRegistryTextField);
        infoPanel.add(gfacLabel);
        infoPanel.add(this.gfacTextField);
        infoPanel.add(resourceMappingLabel);
        infoPanel.add(this.resourceMappingField);
        infoPanel.add(gatekeeperLabel);
        infoPanel.add(this.gatekeeperField);
        infoPanel.add(jobMagerLabel);
        infoPanel.add(this.jobManagerField);
        infoPanel.layout(6, 2, GridPanel.WEIGHT_NONE, 1);

        // leavign the defualts around just
        // LeadResourceMapping resourceMapping = new LeadResourceMapping(
        // "login.bigred.iu.teragrid.org");
        // leadContext.setResourceMapping(resourceMapping);
        //
        // resourceMapping
        // .setGatekeeperEPR(new URI(
        // "http://pagodatree.cs.indiana.edu:54321/axis2/services/SigiriService")
        // );
        // resourceMapping.setJobManager("Sigiri");

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

        // this.deployNewAndInvokeButton = new JButton("Deploy and Invoke");
        // //TODO Is this feature necessary, if yes Enable this.
        // this.deployNewAndInvokeButton.setEnabled(false);
        // this.deployNewAndInvokeButton.addActionListener(new AbstractAction()
View Full Code Here

    // 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.xRegistryTextField = new XBayaTextField();
        // XBayaLabel xRegistryLabel = new XBayaLabel("XRegistry URL", this.xRegistryTextField);
        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(xRegistryLabel);
        // infoPanel.add(this.xRegistryTextField);
        // infoPanel.add(gfacLabel);
        // infoPanel.add(this.gfacTextField);
        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

     */
    private void initGUI() {
        this.urlTextField = new XBayaTextField();
        XBayaLabel urlLabel = new XBayaLabel("URL", this.urlTextField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(urlLabel);
        infoPanel.add(this.urlTextField);
        infoPanel.layout(1, 2, GridPanel.WEIGHT_NONE, 1);

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

        this.myProxyChecker = new MyProxyChecker(this.engine);
        initGUI();
    }

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

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

        // this.xRegistryTextField = new XBayaTextField();
        // XBayaLabel xRegistryLabel = new XBayaLabel("XRegistry URL", this.xRegistryTextField);

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

        this.inputFilepathField = new XBayaTextField();
        this.inputFilepathField.setText("/Users/fanye/Documents/fileList");
        XBayaLabel filePathLabel = new XBayaLabel("Input File", this.inputFilepathField);

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        // infoPanel.add(xRegistryLabel);
        // infoPanel.add(this.xRegistryTextField);
        infoPanel.add(gfacLabel);
        infoPanel.add(this.gfacTextField);
        infoPanel.add(filePathLabel);
        infoPanel.add(this.inputFilepathField);

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

        this.invokeButton = new JButton("Invoke");
        this.invokeButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                execute();
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("Register");
                if (!isNewDescription()){
                  okButton.setText("Update");
                }
                okButton.setEnabled(false);
                okButton.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        try {
              saveServiceDescription();
              close();
            } catch (RegistryException e1) {
              e1.printStackTrace();
            }
                    }
                });
                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(txtApplicationServiceName);
        GridPanel pnlTables=new GridPanel();
       
        GridPanel parameterPanel=new GridPanel();
    parameterPanel.add(lblInputParameters);
        parameterPanel.add(scrollPane);
      parameterPanel.add(btnDeleteParameter);
      parameterPanel.add(chkForceFileStagingToWorkDir);
     
        SwingUtil.layoutToGrid(contentPanel.getSwingComponent(), 1, 2, SwingUtil.WEIGHT_NONE, 1);
      SwingUtil.layoutToGrid(parameterPanel.getSwingComponent(), 4, 1, 1, 0);
     
      pnlTables.add(parameterPanel);
      pnlTables.add(createHostDeploymentTable());
     
      pnlTables.layout(2, 1, SwingUtil.WEIGHT_EQUALLY, 0);
     
        GridPanel infoPanel = new GridPanel();
    infoPanel.add(contentPanel);
    infoPanel.add(pnlTables);
        infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
    infoPanel.layout(2, 1, 1, 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

          }
        });
        JScrollPane scrollPane = new JScrollPane();
        scrollPane.setViewportView(tblHosts);
       
        GridPanel pnlTableButtons = new GridPanel();
        pnlTableButtons.add(btnNewDeployment);
        pnlTableButtons.add(btnEditDeployment);
        pnlTableButtons.add(btnDeleteDeployment);
        pnlTableButtons.layout(1, 3,SwingUtil.WEIGHT_NONE,SwingUtil.WEIGHT_EQUALLY);
       
        GridPanel pnlMainPanel = new GridPanel();
        pnlMainPanel.add(scrollPane);
       
        pnlMainPanel.add(pnlTableButtons);
        pnlMainPanel.layout(2, 1, 0, 0);
        btnEditDeployment.setEnabled(false);
      btnDeleteDeployment.setEnabled(false);
        return pnlMainPanel;
  }
View Full Code Here

  private void initGUI() {
        setTitle("Application Description Advance Options");
        setModal(true);
        setBounds(100, 100, 600, 400);
        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();
       
        txtInputDir = new XBayaTextField();
       
        XBayaLabel lblInputDirectory = new XBayaLabel("Input directory",txtInputDir);

        JLabel lblLocations = new JLabel("Locations");
        lblLocations.setFont(new Font("Tahoma", Font.BOLD, 11));

        txtOutputDir = new XBayaTextField();
        XBayaLabel lblOutputDirectory = new XBayaLabel("Output directory",txtOutputDir);

        txtWorkingDir = new XBayaTextField();
        XBayaLabel lblWorkingDir = new XBayaLabel("Static Working directory",txtWorkingDir);
       
        JLabel lblProgramData = new JLabel("Program data");
        lblProgramData.setFont(new Font("Tahoma", Font.BOLD, 11));


        txtSTDIN = new XBayaTextField();
        XBayaLabel lblStdin = new XBayaLabel("STDIN",txtSTDIN);


        txtSTDOUT = new XBayaTextField();
        XBayaLabel lblStdout = new XBayaLabel("STDOUT",txtSTDOUT);


        txtSTDERR = new XBayaTextField();
        XBayaLabel lblStderr = new XBayaLabel("STDERR",txtSTDERR);

        JLabel other = new JLabel("Other");
        other.setFont(new Font("Tahoma", Font.BOLD, 11));

        JSeparator separator_1 = new JSeparator();
        separator_1.setOrientation(SwingConstants.VERTICAL);

        JLabel lblEnvironmentalVariables = new JLabel("Environmental Variables");
        lblEnvironmentalVariables.setFont(new Font("Tahoma", Font.BOLD, 11));

        JScrollPane scrollPane = new JScrollPane();

        btnDeleteVariable = new JButton("Delete variable");
        btnDeleteVariable.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                deleteSelectedRows();
            }
        });
        btnDeleteVariable.setEnabled(false);
        tblEnv = new JTable();
        tblEnv.setFillsViewportHeight(true);
        scrollPane.setViewportView(tblEnv);
        tblEnv.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        defaultTableModel = new DefaultTableModel(new Object[][] { { null, null }, }, new String[] { "Name",
                "Value" }) {
            @SuppressWarnings("rawtypes")
      Class[] columnTypes = new Class[] { String.class, String.class };

            @SuppressWarnings({ "rawtypes", "unchecked" })
      public Class getColumnClass(int columnIndex) {
                return columnTypes[columnIndex];
            }
        };
        tblEnv.setModel(defaultTableModel);
        defaultTableModel.addTableModelListener(new TableModelListener() {
            @Override
            public void tableChanged(TableModelEvent arg0) {
                if (!tableModelChanging) {
                    addNewRowIfLastIsNotEmpty();
                }
            }

        });
        tblEnv.getColumnModel().getColumn(0).setPreferredWidth(67);
        tblEnv.getColumnModel().getColumn(1).setPreferredWidth(158);
        ListSelectionModel selectionModel = tblEnv.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        selectionModel.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                btnDeleteVariable.setEnabled(tblEnv.getSelectedRows().length > 0);
            }

        });
       
        GridPanel leftPanel = new GridPanel();
        leftPanel.add(lblLocations);
        leftPanel.add(new JLabel());
        leftPanel.add(lblInputDirectory);
        leftPanel.add(txtInputDir);
        leftPanel.add(lblOutputDirectory);
        leftPanel.add(txtOutputDir);
        leftPanel.add(lblWorkingDir);
        leftPanel.add(txtWorkingDir);
        leftPanel.add(lblProgramData);
       
        leftPanel.add(new JLabel());
        leftPanel.add(lblStdin);
        leftPanel.add(txtSTDIN);
        leftPanel.add(lblStdout);
        leftPanel.add(txtSTDOUT);
        leftPanel.add(lblStderr);
        leftPanel.add(txtSTDERR);
       
        SwingUtil.layoutToGrid(leftPanel.getSwingComponent(), 8, 2, SwingUtil.WEIGHT_NONE, 1);
       
        GridPanel rightPanel = new GridPanel();
        rightPanel.add(lblEnvironmentalVariables);
        rightPanel.add(scrollPane);
        rightPanel.add(btnDeleteVariable);
        rightPanel.getSwingComponent().setSize(150, -1);
        leftPanel.getSwingComponent().setSize(150, -1);
        SwingUtil.layoutToGrid(rightPanel.getSwingComponent(), 3, 1, 1, 0);
       
        GridPanel p=new GridPanel();
        p.add(leftPanel);
        p.add(new JSeparator(JSeparator.VERTICAL));
        p.layout(1,2, 0,0);
        panel.add(p);
        panel.add(rightPanel);
        panel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());

        SwingUtil.layoutToGrid(panel.getSwingComponent(), 1, 2, SwingUtil.WEIGHT_NONE, SwingUtil.WEIGHT_EQUALLY);
View Full Code Here

    private void initGUI() {
      descriptorList= new JList(new DefaultListModel());
      descriptorList.setCellRenderer(new DescriptorListCellRenderer(descriptorType));
      JScrollPane pane = new JScrollPane(descriptorList);

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

        descriptorList.addListSelectionListener(new ListSelectionListener(){
      @Override
      public void valueChanged(ListSelectionEvent e) {
        boolean isSelected=descriptorList.getSelectedIndex()!=-1;
        okButton.setEnabled(isSelected);
      }
         
        });
        okButton = new JButton("OK");
        okButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              serviceSelected=true;
              close();
            }

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

        GridPanel buttonPanel = new GridPanel();
        buttonPanel.add(okButton);
        buttonPanel.add(closeButton);
        buttonPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
        String title=null;
        switch (descriptorType){
          case HOST:
            title="Host Descriptions";
            break;
          case SERVICE:
            title="Service Descriptions";
            break;
          case APPLICATION:
            title="Application Descriptions";
            break;
        }
        getContentPane().add(infoPanel.getSwingComponent());
        getContentPane().add(buttonPanel.getSwingComponent());
        SwingUtil.layoutToGrid(getContentPane(), 2, 1, 0, 0);
        getRootPane().setDefaultButton(okButton);
        okButton.setEnabled(false);
        loadDescriptors();
    }
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.