Package org.apache.airavata.xbaya.gui

Examples of org.apache.airavata.xbaya.gui.GridPanel


    private void initGUI() {
        setTitle("Host Description Advance 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();

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

        cmbJobType = new XBayaComboBox(new DefaultComboBoxModel(getJobTypesAsStrings()));
        cmbJobType.setEditable(false);


    XBayaLabel lbljobType = new XBayaLabel("Job Type",cmbJobType);
    XBayaLabel lblProjectAccountNumber = new XBayaLabel("Project Account Number",txtProjectAccountNumber);
    XBayaLabel lblProjectAccountDescription = new XBayaLabel("Project Account Description",txtProjectAccountDescription);
        XBayaLabel lblStaticWorkingDirectory = new XBayaLabel("Static Working Directory",txtStaticWorkingDirectory);
        XBayaLabel lblQueueType = new XBayaLabel("Queue Type",txtQueueType);
    XBayaLabel lblMaxWallTime = new XBayaLabel("Max Wall Time",txtMaxWallTime);
    XBayaLabel lblCpuCount = new XBayaLabel("CPU Count",txtCpuCount);
    XBayaLabel 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(lblStaticWorkingDirectory);
        panel.add(txtStaticWorkingDirectory);
    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(), 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


    /**
   *
   */
    private void initGUI() {
        GridPanel infoPanel = new GridPanel();
        this.docTypeComboBox = new XBayaComboBox(new javax.swing.DefaultComboBoxModel(new String[] { "Host",
                "Application", "Service" }));
        XBayaLabel docTypeLabel = new XBayaLabel("Document Type", this.docTypeComboBox);
        this.fileLocationField = new XBayaTextField();
        XBayaLabel fileLocationLabel = new XBayaLabel("File Location", this.fileLocationField);
        JLabel dummyLabel = new JLabel("");
        this.fileChooserButton = new JButton("Choose File...");
        this.fileChooserButton.addActionListener(new AbstractAction() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JFileChooser jf = new JFileChooser();
                int returnVal = jf.showOpenDialog(RegisterThroughFileWindow.this.dialog.getDialog());
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    RegisterThroughFileWindow.this.fileLocationField.setText(jf.getSelectedFile().getAbsolutePath());
                }
            }
        });

        infoPanel.add(docTypeLabel);
        infoPanel.add(this.docTypeComboBox);
        infoPanel.add(fileLocationLabel);
        infoPanel.add(this.fileLocationField);
        infoPanel.add(dummyLabel);
        infoPanel.add(this.fileChooserButton);
        infoPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);

        JPanel buttonPanel = new JPanel();
        this.registerButton = new JButton("Register");
        this.registerButton.addActionListener(new AbstractAction() {
            @Override
View Full Code Here

        this.messageTextArea = new XBayaTextArea();
        this.messageTextArea.setSize(500, 500);
        this.messageTextArea.setEditable(false);
        XBayaLabel messageLabel = new XBayaLabel(MonitorEventData.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

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

        GridPanel mainPanel = new GridPanel();

        MonitorPanel monitorPanel = new MonitorPanel(this.engine, this.nodeID);
        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

                    MonitorConfigurationWindow.this.messageBoxTextField.setEnabled(false);
                }
            }
        });

        GridPanel infoPanel = new GridPanel();
        infoPanel.add(brokerLabel);
        infoPanel.add(this.brokerTextField);
        infoPanel.add(topicLabel);
        infoPanel.add(this.topicTextField);
        infoPanel.add(dummyLabel);
        infoPanel.add(this.pullCheckBox);
        infoPanel.add(msgBoxLabel);
        infoPanel.add(this.messageBoxTextField);
        infoPanel.layout(4, 2, SwingUtil.WEIGHT_NONE, 1);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                setConfiguration();
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

TOP

Related Classes of org.apache.airavata.xbaya.gui.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.