Search in sources :

Example 1 with ParameterPropertyPanel

use of org.apache.airavata.xbaya.ui.views.ParameterPropertyPanel in project airavata by apache.

the class ParameterPropertyWindow method initGui.

private void initGui() {
    this.inputPanel = new ParameterPropertyPanel("Inputs");
    this.outputPanel = new ParameterPropertyPanel("Outputs");
    JPanel mainPanel = new JPanel();
    // To have the same size.
    mainPanel.setLayout(new GridLayout(1, 2));
    mainPanel.add(this.inputPanel.getSwingComponent());
    mainPanel.add(this.outputPanel.getSwingComponent());
    JPanel buttonPanel = new JPanel();
    this.okButton = new JButton("OK");
    this.okButton.setDefaultCapable(true);
    this.okButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            ok();
        }
    });
    buttonPanel.add(this.okButton);
    JButton cancelButton = new JButton("Cancel");
    cancelButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            hide();
        }
    });
    buttonPanel.add(cancelButton);
    this.dialog = new XBayaDialog(this.engine.getGUI(), "Workflow Paremeter Properties", mainPanel, buttonPanel);
    this.dialog.setDefaultButton(this.okButton);
}
Also used : JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) XBayaDialog(org.apache.airavata.xbaya.ui.dialogs.XBayaDialog) ActionEvent(java.awt.event.ActionEvent) JButton(javax.swing.JButton) ParameterPropertyPanel(org.apache.airavata.xbaya.ui.views.ParameterPropertyPanel) AbstractAction(javax.swing.AbstractAction)

Aggregations

GridLayout (java.awt.GridLayout)1 ActionEvent (java.awt.event.ActionEvent)1 AbstractAction (javax.swing.AbstractAction)1 JButton (javax.swing.JButton)1 JPanel (javax.swing.JPanel)1 XBayaDialog (org.apache.airavata.xbaya.ui.dialogs.XBayaDialog)1 ParameterPropertyPanel (org.apache.airavata.xbaya.ui.views.ParameterPropertyPanel)1