Search in sources :

Example 1 with XBayaList

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

the class ParameterPropertyPanel method initGUI.

private void initGUI() {
    this.parameterList = new XBayaList();
    this.parameterList.addListSelectionListener(new ListSelectionListener() {

        public void valueChanged(ListSelectionEvent event) {
            selectionChanged();
        }
    });
    this.upButton = new JButton("UP");
    this.upButton.setEnabled(false);
    this.upButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            up();
        }
    });
    this.downButton = new JButton("DOWN");
    this.downButton.setEnabled(false);
    this.downButton.addActionListener(new AbstractAction() {

        public void actionPerformed(ActionEvent e) {
            down();
        }
    });
    GridPanel buttonPanel = new GridPanel();
    buttonPanel.add(this.upButton);
    buttonPanel.add(this.downButton);
    buttonPanel.layout(2, 1, GridPanel.WEIGHT_NONE, 0);
    GridPanel reorderingPanel = new GridPanel();
    reorderingPanel.add(this.parameterList);
    reorderingPanel.add(buttonPanel);
    reorderingPanel.layout(1, 2, 0, 0);
    this.metadataTextArea = new XBayaTextArea();
    JLabel metadataLabel = new JLabel("Metadata");
    metadataLabel.setLabelFor(this.metadataTextArea.getSwingComponent());
    this.panel = new GridPanel();
    this.panel.add(reorderingPanel);
    this.panel.add(metadataLabel);
    this.panel.add(this.metadataTextArea);
    this.panel.layout(3, 1, 2, 0);
    TitledBorder border = BorderFactory.createTitledBorder(this.title);
    this.panel.getSwingComponent().setBorder(border);
}
Also used : ActionEvent(java.awt.event.ActionEvent) GridPanel(org.apache.airavata.xbaya.ui.widgets.GridPanel) XBayaList(org.apache.airavata.xbaya.ui.widgets.XBayaList) ListSelectionEvent(javax.swing.event.ListSelectionEvent) JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) XBayaTextArea(org.apache.airavata.xbaya.ui.widgets.XBayaTextArea) TitledBorder(javax.swing.border.TitledBorder) AbstractAction(javax.swing.AbstractAction) ListSelectionListener(javax.swing.event.ListSelectionListener)

Aggregations

ActionEvent (java.awt.event.ActionEvent)1 AbstractAction (javax.swing.AbstractAction)1 JButton (javax.swing.JButton)1 JLabel (javax.swing.JLabel)1 TitledBorder (javax.swing.border.TitledBorder)1 ListSelectionEvent (javax.swing.event.ListSelectionEvent)1 ListSelectionListener (javax.swing.event.ListSelectionListener)1 GridPanel (org.apache.airavata.xbaya.ui.widgets.GridPanel)1 XBayaList (org.apache.airavata.xbaya.ui.widgets.XBayaList)1 XBayaTextArea (org.apache.airavata.xbaya.ui.widgets.XBayaTextArea)1