use of org.apache.airavata.xbaya.ui.widgets.GridPanel in project airavata by apache.
the class ForEachConfigurationDialog 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, "ForEach Configuration", gridPanel, buttonPanel);
this.dialog.setDefaultButton(okButton);
}
Aggregations