DRAWN = false;
LEVEL = level;
int childIndex = 0;
for (int i = 0; i < node.getChildNodes().getLength(); i++) {
Node childNode = node.getChildNodes().item(i);
if (childNode.getNodeName().equals("initial")) {
com.smartgwt.client.widgets.Window window = new com.smartgwt.client.widgets.Window();
String command = childNode.getAttributes().item(0).getNodeValue();
int height = Integer.parseInt(childNode.getAttributes().item(1).getNodeValue());
int width = Integer.parseInt(childNode.getAttributes().item(2).getNodeValue());
String description;
if (childNode.hasChildNodes() && childNode.getChildNodes().item(0).getNodeName().equals("description"))
description = childNode.getChildNodes().item(0).getFirstChild().getNodeValue();
else
description = "Welcome Note";
int left = Window.getScrollLeft() + (Home.WIDTH/2) - (width/2);
int top = Window.getScrollTop() + (Home.HEIGHT/2) - (height/2);
RootPanel.get().add(window, left, top);
window.setShowMinimizeButton(false);
window.setSize(String.valueOf(width),String.valueOf(height));
window.setCanDragReposition(true);
window.setCanDrop(true);
window.setTitle(description);
window.setSrc(command);
window.draw();
}else if (childNode.getNodeName().equals("description")) {
DESCRIPTION = childNode.getFirstChild().getNodeValue();
}else if (childNode.getNodeName().equals("operation")) {
Operation operation = new Operation();
operation.NAME = childNode.getAttributes().item(0).getNodeValue();
operation.COMMAND = childNode.getAttributes().item(1).getNodeValue();
operation.HEIGHT = Integer.parseInt(childNode.getAttributes().item(2).getNodeValue());
operation.WIDTH = Integer.parseInt(childNode.getAttributes().item(3).getNodeValue());
if(childNode.getAttributes().getLength()>4)
operation.ICON = childNode.getAttributes().item(4).getNodeValue();
else
operation.ICON = ICON;
if (childNode.hasChildNodes() && childNode.getChildNodes().item(0).getNodeName().equals("description"))
operation.DESCRIPTION = childNode.getChildNodes().item(0).getFirstChild().getNodeValue();
OPERATIONS.add(operation);
}else if (childNode.getNodeName().equals("relationship")) {
RELATIONSHIP = new Operations();
for(int ii = 0; ii <childNode.getChildNodes().getLength();ii++){
Node relationshipNode = childNode.getChildNodes().item(ii);
if (relationshipNode.getNodeName().equals("operation")) {
Operation operation = new Operation();
operation.NAME = relationshipNode.getAttributes().item(0).getNodeValue();
operation.COMMAND = relationshipNode.getAttributes().item(1).getNodeValue();
operation.HEIGHT = Integer.parseInt(relationshipNode.getAttributes().item(2).getNodeValue());
operation.WIDTH = Integer.parseInt(relationshipNode.getAttributes().item(3).getNodeValue());
if(relationshipNode.getAttributes().getLength()>4)
operation.ICON = relationshipNode.getAttributes().item(4).getNodeValue();
else
operation.ICON = null;
if (relationshipNode.hasChildNodes() && relationshipNode.getChildNodes().item(0).getNodeName().equals("description"))
operation.DESCRIPTION = relationshipNode.getChildNodes().item(0).getFirstChild().getNodeValue();
RELATIONSHIP.add(operation);
}
}
}else if (childNode.getNodeName().equals("entity")) {
MindMap childEntity;