ServerDescriptor server = null;
if (getInfo() != null)
{
server = getInfo().getServerDescriptor();
}
GeneralMonitoringTreeNode root;
if (server == null)
{
root =
new GeneralMonitoringTreeNode(
INFO_CTRL_PANEL_GENERAL_MONITORING_ROOT.get().toString(),
NodeType.ROOT,
true);
}
else
{
root =
new GeneralMonitoringTreeNode(
getServerName(server),
NodeType.ROOT,
true);
}
Message[] messages = getNodeMessages();
NodeType[] identifiers = getNodeTypes();
for (int i=0; i < messages.length; i++)
{
root.add(new GeneralMonitoringTreeNode(messages[i].toString(),
identifiers[i], false));
}
DefaultTreeModel model = new DefaultTreeModel(root);
tree.setModel(model);