public void actionPerformed(ActionEvent arg0) {
setForceFileStagingToWorkDir(chkForceFileStagingToWorkDir.isSelected());
}
});
GridPanel buttonPane = new GridPanel();
{
GridBagLayout gbl_buttonPane = new GridBagLayout();
gbl_buttonPane.columnWidths = new int[] { 307, 136, 0 };
gbl_buttonPane.rowHeights = new int[] { 33, 0 };
gbl_buttonPane.columnWeights = new double[] { 0.0, 0.0, Double.MIN_VALUE };
gbl_buttonPane.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
lblError = new JLabel("");
lblError.setForeground(Color.RED);
GridBagConstraints gbc_lblError = new GridBagConstraints();
gbc_lblError.insets = new Insets(0, 0, 0, 5);
gbc_lblError.gridx = 0;
gbc_lblError.gridy = 0;
buttonPane.add(lblError);
JPanel panel = new JPanel();
GridBagConstraints gbc_panel = new GridBagConstraints();
gbc_panel.anchor = GridBagConstraints.NORTHWEST;
gbc_panel.gridx = 1;
gbc_panel.gridy = 0;
buttonPane.add(panel);
{
JButton resetButton = new JButton("Reset");
resetButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
loadData();
}
});
panel.add(resetButton);
}
{
okButton = new JButton("Save");
if (!isNewDescription()){
okButton.setText("Update");
}
okButton.setEnabled(false);
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
saveServiceDescription();
close();
}
});
panel.add(okButton);
okButton.setActionCommand("OK");
getRootPane().setDefaultButton(okButton);
}
{
JButton cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setServiceCreated(false);
close();
}
});
panel.add(cancelButton);
cancelButton.setActionCommand("Cancel");
}
}
contentPanel.add(lblServiceName);
contentPanel.add(txtServiceName);
GridPanel parameterPanel=new GridPanel();
parameterPanel.add(lblInputParameters);
parameterPanel.add(scrollPane);
parameterPanel.add(btnDeleteParameter);
SwingUtil.layoutToGrid(contentPanel.getSwingComponent(), 1, 2, SwingUtil.WEIGHT_NONE, 1);
SwingUtil.layoutToGrid(parameterPanel.getSwingComponent(), 3, 1, 1, 0);
GridPanel infoPanel = new GridPanel();
infoPanel.add(contentPanel);
infoPanel.add(parameterPanel);
infoPanel.add(chkForceFileStagingToWorkDir);
infoPanel.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
infoPanel.layout(3, 1, 1, 0);
getContentPane().add(infoPanel.getSwingComponent());
getContentPane().add(buttonPane.getSwingComponent());
buttonPane.getSwingComponent().setBorder(BorderFactory.createEtchedBorder());
SwingUtil.layoutToGrid(getContentPane(), 2, 1, 0, 0);
setResizable(true);
getRootPane().setDefaultButton(okButton);