JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
}
}
});
XBayaLinkButton lnkNewService = new XBayaLinkButton("New button");
lnkNewService.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
try {
ServiceDescriptionDialog serviceDescriptionDialog = new ServiceDescriptionDialog(getRegistry());
serviceDescriptionDialog.open();
if (serviceDescriptionDialog.isServiceCreated()) {
loadServiceDescriptions();
cmbServiceName.setSelectedItem(serviceDescriptionDialog.getServiceName());
}
} catch (Exception e1) {
e1.printStackTrace();
JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
}
}
});
lnkNewService.setText("Create new service...");
lnkNewService.setHorizontalAlignment(SwingConstants.TRAILING);
cmbServiceName = new JComboBox();
cmbServiceName.addActionListener(this);
// cmbServiceName.setRenderer(new DefaultListCellRenderer());
cmbHostName = new JComboBox();
cmbHostName.addActionListener(this);
XBayaLabel lblHostName = new XBayaLabel("Host",cmbHostName);
XBayaLinkButton lnkNewHost = new XBayaLinkButton("New button");
lnkNewHost.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(engine);
hostDescriptionDialog.open();
if (hostDescriptionDialog.isHostCreated()) {
loadHostDescriptions();
cmbHostName.setSelectedItem(hostDescriptionDialog.getHostLocation());
}
} catch (Exception e1) {
e1.printStackTrace();
JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
}
}
});
lnkNewHost.setText("Create new host...");
lnkNewHost.setHorizontalAlignment(SwingConstants.TRAILING);
XBayaLabel lblService = new XBayaLabel("Service",cmbServiceName);
JLabel lblBindThisDeployment = new JLabel("Bind this deployment description to:");
lblBindThisDeployment.setFont(new Font("Tahoma", Font.BOLD, 11));