cmbHostName = new JComboBox();
cmbHostName.addActionListener(this);
XBayaLabel lblHostName = new XBayaLabel("Application host",cmbHostName);
// lblHostName.getSwingComponent().setFont(new Font("Tahoma", Font.ITALIC, 11));
XBayaLinkButton lnkNewHost = new XBayaLinkButton("New button");
lnkNewHost.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
HostDescriptionDialog hostDescriptionDialog = new HostDescriptionDialog(engine.getConfiguration().getJcrComponentRegistry().getRegistry(), null);
hostDescriptionDialog.setLocationRelativeTo(getContentPane());
hostDescriptionDialog.open();
if (hostDescriptionDialog.isHostCreated()) {
ProgressMonitor progressMonitor = new ProgressMonitor(getContentPane(), "Host Descriptions", "Refreshing host list..", 0, 200);
int progress=1;
progressMonitor.setProgress(progress++);
while(cmbHostName.getSelectedIndex()==-1 || !cmbHostName.getSelectedItem().toString().equals(hostDescriptionDialog.getHostLocation())){
loadHostDescriptions();
cmbHostName.setSelectedItem(hostDescriptionDialog.getHostLocation());
progressMonitor.setProgress(progress++);
Thread.sleep(50);
}
progressMonitor.setProgress(200);
}
} catch (Exception e1) {
e1.printStackTrace();
JOptionPane.showMessageDialog(null, e1.getLocalizedMessage());
}
}
});
lnkNewHost.setText("Create new host...");
lnkNewHost.setHorizontalAlignment(SwingConstants.TRAILING);
// JLabel lblBindThisDeployment = new JLabel("Bind this deployment description to:");
// lblBindThisDeployment.setFont(new Font("Tahoma", Font.BOLD, 11));
btnHostAdvanceOptions=new JButton("HPC Configuration...");