Search in sources :

Example 11 with XBayaLabel

use of org.apache.airavata.xbaya.ui.widgets.XBayaLabel in project airavata by apache.

the class ConstantConfigurationDialog method initGui.

/**
 * Initializes the GUI.
 */
private void initGui() {
    this.nameTextField = new XBayaTextField();
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
    this.idTextField = new XBayaTextField();
    this.idTextField.setEditable(false);
    XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);
    this.typeTextField = new XBayaTextField();
    this.typeTextField.setEditable(false);
    XBayaLabel typeLabel = new XBayaLabel("Type", this.typeTextField);
    // for string
    this.valueTextField = new XBayaTextField();
    // for XML
    this.valueTextArea = new XBayaTextArea();
    // temporaly set text field.
    this.valueLabel = new XBayaLabel("", this.valueTextField);
    this.gridPanel = new GridPanel();
    this.gridPanel.add(nameLabel);
    this.gridPanel.add(this.nameTextField);
    this.gridPanel.add(idLabel);
    this.gridPanel.add(this.idTextField);
    this.gridPanel.add(typeLabel);
    this.gridPanel.add(this.typeTextField);
    this.gridPanel.add(this.valueLabel);
    this.gridPanel.add(this.valueTextField);
    this.gridPanel.layout(4, 2, 3, 1);
    JButton okButton = new JButton("OK");
    okButton.addActionListener(new AbstractAction() {

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

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.xbayaGUI, "Constant Configuration", this.gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) XBayaTextArea(org.apache.airavata.xbaya.ui.widgets.XBayaTextArea) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 12 with XBayaLabel

use of org.apache.airavata.xbaya.ui.widgets.XBayaLabel in project airavata by apache.

the class DifferedInputConfigurationDialog method initGui.

/**
 * Initializes the GUI.
 */
private void initGui() {
    this.nameTextField = new XBayaTextField();
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
    this.descriptionTextArea = new XBayaTextArea();
    XBayaLabel descriptionLabel = new XBayaLabel("Description", this.descriptionTextArea);
    // for string
    this.valueTextField = new XBayaTextField();
    // for XML
    this.valueTextArea = new XBayaTextArea();
    // temporaly set text field.
    this.valueLabel = new XBayaLabel("", this.valueTextField);
    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);
    this.gridPanel.add(this.valueTextField);
    this.gridPanel.add(metadataLabel);
    this.gridPanel.add(this.metadataTextArea);
    this.gridPanel.layout(4, 2, 3, 1);
    JButton okButton = new JButton("OK");
    okButton.addActionListener(new AbstractAction() {

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

        @Override
        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.xbayaGUI, "Input Parameter Configuration", this.gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) XBayaTextArea(org.apache.airavata.xbaya.ui.widgets.XBayaTextArea) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 13 with XBayaLabel

use of org.apache.airavata.xbaya.ui.widgets.XBayaLabel in project airavata by apache.

the class DoWhileConfigrationDialog method initGui.

/**
 * Initializes the GUI.
 */
private void initGui() {
    this.nameTextField = new XBayaTextField();
    this.nameTextField.setEditable(false);
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
    this.idTextField = new XBayaTextField();
    this.idTextField.setEditable(false);
    XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);
    SpinnerNumberModel model = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1);
    this.numPorts = new JSpinner(model);
    XBayaLabel numPortLabel = new XBayaLabel("Number of Inputs", this.numPorts);
    this.xpathTextField = new XBayaTextField();
    XBayaLabel xpathLabel = new XBayaLabel("XPath", this.xpathTextField);
    GridPanel gridPanel = new GridPanel();
    gridPanel.add(nameLabel);
    gridPanel.add(this.nameTextField);
    gridPanel.add(idLabel);
    gridPanel.add(this.idTextField);
    gridPanel.add(numPortLabel);
    gridPanel.add(this.numPorts);
    gridPanel.add(xpathLabel);
    gridPanel.add(this.xpathTextField);
    gridPanel.layout(4, 2, GridPanel.WEIGHT_NONE, 1);
    JButton okButton = new JButton("OK");
    okButton.addActionListener(new AbstractAction() {

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

        @Override
        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(xbayaGUI, "While Configuration", gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : SpinnerNumberModel(javax.swing.SpinnerNumberModel) JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JSpinner(javax.swing.JSpinner) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 14 with XBayaLabel

use of org.apache.airavata.xbaya.ui.widgets.XBayaLabel in project airavata by apache.

the class EndBlockConfigurationDialog method initGui.

/**
 * Initializes the GUI.
 */
private void initGui() {
    this.nameTextField = new XBayaTextField();
    this.nameTextField.setEditable(false);
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
    this.idTextField = new XBayaTextField();
    this.idTextField.setEditable(false);
    XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);
    SpinnerNumberModel model = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1);
    this.numPorts = new JSpinner(model);
    XBayaLabel numPortLabel = new XBayaLabel("Number of Parameters", this.numPorts);
    GridPanel gridPanel = new GridPanel();
    gridPanel.add(nameLabel);
    gridPanel.add(this.nameTextField);
    gridPanel.add(idLabel);
    gridPanel.add(this.idTextField);
    gridPanel.add(numPortLabel);
    gridPanel.add(this.numPorts);
    gridPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);
    JButton okButton = new JButton("OK");
    okButton.addActionListener(new AbstractAction() {

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

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.xbayaGUI, "Endif Configuration", gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : SpinnerNumberModel(javax.swing.SpinnerNumberModel) JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JSpinner(javax.swing.JSpinner) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 15 with XBayaLabel

use of org.apache.airavata.xbaya.ui.widgets.XBayaLabel in project airavata by apache.

the class EndifConfigurationDialog method initGui.

/**
 * Initializes the GUI.
 */
private void initGui() {
    this.nameTextField = new XBayaTextField();
    this.nameTextField.setEditable(false);
    XBayaLabel nameLabel = new XBayaLabel("Name", this.nameTextField);
    this.idTextField = new XBayaTextField();
    this.idTextField.setEditable(false);
    XBayaLabel idLabel = new XBayaLabel("ID", this.idTextField);
    SpinnerNumberModel model = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1);
    this.numPorts = new JSpinner(model);
    XBayaLabel numPortLabel = new XBayaLabel("Number of Parameters", this.numPorts);
    GridPanel gridPanel = new GridPanel();
    gridPanel.add(nameLabel);
    gridPanel.add(this.nameTextField);
    gridPanel.add(idLabel);
    gridPanel.add(this.idTextField);
    gridPanel.add(numPortLabel);
    gridPanel.add(this.numPorts);
    gridPanel.layout(3, 2, GridPanel.WEIGHT_NONE, 1);
    JButton okButton = new JButton("OK");
    okButton.addActionListener(new AbstractAction() {

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

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.xbayaGUI, "Endif Configuration", gridPanel, buttonPanel);
    this.dialog.setDefaultButton(okButton);
}
Also used : SpinnerNumberModel(javax.swing.SpinnerNumberModel) JPanel(javax.swing.JPanel) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) JSpinner(javax.swing.JSpinner) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Aggregations

XBayaLabel (org.apache.airavata.xbaya.ui.widgets.XBayaLabel)33 XBayaTextField (org.apache.airavata.xbaya.ui.widgets.XBayaTextField)32 ActionEvent (java.awt.event.ActionEvent)31 XBayaDialog (org.apache.airavata.xbaya.ui.dialogs.XBayaDialog)31 GridPanel (org.apache.airavata.xbaya.ui.widgets.GridPanel)31 AbstractAction (javax.swing.AbstractAction)26 JButton (javax.swing.JButton)26 JPanel (javax.swing.JPanel)25 XBayaTextArea (org.apache.airavata.xbaya.ui.widgets.XBayaTextArea)9 JSpinner (javax.swing.JSpinner)8 SpinnerNumberModel (javax.swing.SpinnerNumberModel)8 JLabel (javax.swing.JLabel)5 AiravataClientException (org.apache.airavata.model.error.AiravataClientException)4 AiravataSystemException (org.apache.airavata.model.error.AiravataSystemException)4 InvalidRequestException (org.apache.airavata.model.error.InvalidRequestException)4 TException (org.apache.thrift.TException)4 ActionListener (java.awt.event.ActionListener)3 XBayaComboBox (org.apache.airavata.xbaya.ui.widgets.XBayaComboBox)3 HashMap (java.util.HashMap)2 Iterator (java.util.Iterator)2