Search in sources :

Example 1 with XBayaTextArea

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

the class WorkflowPropertyWindow method initGui.

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);
    GridPanel mainPanel = new GridPanel();
    mainPanel.add(nameLabel);
    mainPanel.add(this.nameTextField);
    mainPanel.add(descriptionLabel);
    mainPanel.add(this.descriptionTextArea);
    mainPanel.layout(new double[] { 0, 0.5 }, new double[] { 0, 1 });
    this.okButton = new JButton("OK");
    this.okButton.addActionListener(new AbstractAction() {

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

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    JPanel buttonPanel = new JPanel();
    buttonPanel.add(this.okButton);
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.xbayaGUI, "Workflow Properties", mainPanel, buttonPanel);
    this.dialog.setDefaultButton(this.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 2 with XBayaTextArea

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

the class RegistryWorkflowPublisherWindow method initGUI.

/**
 * Intialize UI
 */
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);
    JPanel buttonPanel = new JPanel();
    this.okButton = new JButton("OK");
    this.okButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            ok();
        }
    });
    buttonPanel.add(this.okButton);
    GridPanel mainPanel = new GridPanel();
    TitledBorder border = new TitledBorder(new EtchedBorder(), "Save Workflow to Registry");
    mainPanel.getSwingComponent().setBorder(border);
    mainPanel.add(nameLabel);
    mainPanel.add(this.nameTextField);
    mainPanel.add(descriptionLabel);
    mainPanel.add(this.descriptionTextArea);
    chkMakePublic = new JCheckBox("Make public");
    mainPanel.add(chkMakePublic);
    mainPanel.layout(2, 2, 0, 0);
    this.dialog = new XBayaDialog(this.engine.getGUI(), "Save Workflow to Registry", mainPanel, buttonPanel);
    this.dialog.setDefaultButton(this.okButton);
}
Also used : JCheckBox(javax.swing.JCheckBox) JPanel(javax.swing.JPanel) EtchedBorder(javax.swing.border.EtchedBorder) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) ActionEvent(java.awt.event.ActionEvent) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) JButton(javax.swing.JButton) XBayaTextField(org.apache.airavata.xbaya.ui.widgets.XBayaTextField) XBayaTextArea(org.apache.airavata.xbaya.ui.widgets.XBayaTextArea) TitledBorder(javax.swing.border.TitledBorder) AbstractAction(javax.swing.AbstractAction) XBayaLabel(org.apache.airavata.xbaya.ui.widgets.XBayaLabel)

Example 3 with XBayaTextArea

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

the class InputConfigurationDialog 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();
    this.valueLabel = new XBayaLabel("Value", this.valueTextField);
    this.dataTypeTextField = new XBayaTextField();
    this.dataTypeTextField.setEditable(false);
    this.dataTypeLabel = new XBayaLabel("Type", this.dataTypeTextField);
    this.gridPanel = new GridPanel();
    this.gridPanel.add(nameLabel);
    this.gridPanel.add(this.nameTextField);
    this.gridPanel.add(this.valueLabel);
    this.gridPanel.add(this.valueTextField);
    this.gridPanel.add(this.dataTypeLabel);
    this.gridPanel.add(this.dataTypeTextField);
    this.gridPanel.add(descriptionLabel);
    this.gridPanel.add(this.descriptionTextArea);
    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, "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 4 with XBayaTextArea

use of org.apache.airavata.xbaya.ui.widgets.XBayaTextArea 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 5 with XBayaTextArea

use of org.apache.airavata.xbaya.ui.widgets.XBayaTextArea 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)

Aggregations

ActionEvent (java.awt.event.ActionEvent)11 AbstractAction (javax.swing.AbstractAction)11 JButton (javax.swing.JButton)11 GridPanel (org.apache.airavata.xbaya.ui.widgets.GridPanel)11 XBayaTextArea (org.apache.airavata.xbaya.ui.widgets.XBayaTextArea)11 JPanel (javax.swing.JPanel)10 XBayaDialog (org.apache.airavata.xbaya.ui.dialogs.XBayaDialog)9 XBayaLabel (org.apache.airavata.xbaya.ui.widgets.XBayaLabel)9 XBayaTextField (org.apache.airavata.xbaya.ui.widgets.XBayaTextField)8 JLabel (javax.swing.JLabel)2 TitledBorder (javax.swing.border.TitledBorder)2 PrintWriter (java.io.PrintWriter)1 StringWriter (java.io.StringWriter)1 JCheckBox (javax.swing.JCheckBox)1 EtchedBorder (javax.swing.border.EtchedBorder)1 ListSelectionEvent (javax.swing.event.ListSelectionEvent)1 ListSelectionListener (javax.swing.event.ListSelectionListener)1 MonitorPanel (org.apache.airavata.xbaya.ui.views.MonitorPanel)1 XBayaList (org.apache.airavata.xbaya.ui.widgets.XBayaList)1