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().getNamedItem("command").getNodeValue();
int height = Integer.parseInt(childNode.getAttributes().getNamedItem("height").getNodeValue());
int width = Integer.parseInt(childNode.getAttributes().getNamedItem("width").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().getNamedItem("name").getNodeValue();
operation.COMMAND = childNode.getAttributes().getNamedItem("command").getNodeValue();
operation.HEIGHT = Integer.parseInt(childNode.getAttributes().getNamedItem("height").getNodeValue());
operation.WIDTH = Integer.parseInt(childNode.getAttributes().getNamedItem("width").getNodeValue());
if(childNode.getAttributes().getLength()>4)
operation.ICON = childNode.getAttributes().getNamedItem("icon").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().getNamedItem("name").getNodeValue();
operation.COMMAND = relationshipNode.getAttributes().getNamedItem("command").getNodeValue();
operation.HEIGHT = Integer.parseInt(relationshipNode.getAttributes().getNamedItem("height").getNodeValue());
operation.WIDTH = Integer.parseInt(relationshipNode.getAttributes().getNamedItem("width").getNodeValue());
if(relationshipNode.getAttributes().getLength()>4)
operation.ICON = relationshipNode.getAttributes().getNamedItem("icon").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;