public CybernodeUI(final Object arg) {
super();
getAccessibleContext().setAccessibleName("Cybernode admin");
ServiceItem item = (ServiceItem) arg;
cybernode = (Cybernode) item.service;
ComputeResourceUtilization computeResource;
try {
cybernodeAdmin = (CybernodeAdmin)cybernode.getAdmin();
computeResource = getComputeResourceUtilization(cybernodeAdmin);
} catch (Exception e) {
e.printStackTrace();
return;
}
//idTable = new Hashtable();
JPanel qPanel = new JPanel();
qPanel.setLayout(new BoxLayout(qPanel, BoxLayout.X_AXIS));
qPanel.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Compute Resource"),
BorderFactory.createEmptyBorder(6, 6, 6, 6)));
qPanel.add(new JLabel("Description"));
qPanel.add(Box.createHorizontalStrut(8));
String field="unknown: system error";
if(computeResource!=null)
field = computeResource.getDescription();
JTextField descTF = new JTextField(field);
descTF.setEnabled(false);
qPanel.add(descTF);
qPanel.add(Box.createHorizontalStrut(8));
qPanel.add(new JLabel("Utilization"));
qPanel.add(Box.createHorizontalStrut(8));
if(computeResource!=null)
field = computeResource.getUtilization().toString();
utilizationTF = new JTextField(field);
utilizationTF.setEnabled(false);
qPanel.add(utilizationTF);
JPanel cPanel = new JPanel();