public virtual Map getSubwidgetMap(XMLWidget subsystem) { this.waitToFinish(); return (Map) this.subsystems.get((object) subsystem); }
private void load([In] NodeList obj0) { for (int index1 = 0; index1 < obj0.getLength(); ++index1) { if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "widget") || String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "static-widget")) { NamedNodeMap attributes1 = obj0.item(index1).getAttributes(); XMLWidget xmlWidget1 = new XMLWidget(); System.get_out().println(); for (int index2 = 0; index2 < attributes1.getLength(); ++index2) { if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "field")) xmlWidget1.setField(attributes1.item(index2).getNodeValue()); else if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "class")) xmlWidget1.setClass(attributes1.item(index2).getNodeValue()); else if (String.instancehelper_equals(attributes1.item(index2).getNodeName(), (object) "type")) xmlWidget1.setType(attributes1.item(index2).getNodeValue()); } TreeMap treeMap = new TreeMap(); NodeList childNodes1 = obj0.item(index1).getChildNodes(); for (int index2 = 0; index2 < childNodes1.getLength(); ++index2) { if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "location")) { int num1 = 0; int num2 = 0; NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "x")) num1 = Integer.parseInt(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "y")) num2 = Integer.parseInt(attributes2.item(index3).getNodeValue()); } xmlWidget1.setLocation(new Point(num1, num2)); } else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "width")) xmlWidget1.setWidth(Integer.parseInt(childNodes1.item(index2).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "height")) xmlWidget1.setHeight(Integer.parseInt(childNodes1.item(index2).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "property")) { NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); string name = (string) null; string str = (string) null; for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "name")) name = attributes2.item(index3).getNodeValue(); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "value")) str = attributes2.item(index3).getNodeValue(); } if (name != null && str != null) xmlWidget1.addProperty(name, str); } else if (String.instancehelper_equals(String.instancehelper_trim(childNodes1.item(index2).getNodeName()), (object) "widget")) { LWSubsystem.setLoaded(this.self); XMLWidget xmlWidget2 = new XMLWidget(); NamedNodeMap attributes2 = childNodes1.item(index2).getAttributes(); NodeList childNodes2 = childNodes1.item(index2).getChildNodes(); for (int index3 = 0; index3 < attributes2.getLength(); ++index3) { if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "field")) xmlWidget2.setField(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "class")) xmlWidget2.setClass(attributes2.item(index3).getNodeValue()); else if (String.instancehelper_equals(attributes2.item(index3).getNodeName(), (object) "type")) xmlWidget2.setType(attributes2.item(index3).getNodeValue()); } System.get_out().println(new StringBuilder().append("\nLoading subwidget \"").append(xmlWidget2.getField()).append("\"").toString()); for (int index3 = 0; index3 < childNodes2.getLength(); ++index3) { string str = String.instancehelper_trim(childNodes2.item(index3).getNodeName()); if (String.instancehelper_equals(str, (object) "location")) { int num1 = 0; int num2 = 0; NamedNodeMap attributes3 = childNodes2.item(index3).getAttributes(); for (int index4 = 0; index4 < attributes3.getLength(); ++index4) { if (String.instancehelper_equals(String.instancehelper_trim(attributes3.item(index4).getNodeName()), (object) "x")) num1 = Integer.parseInt(attributes3.item(index4).getNodeValue()); else if (String.instancehelper_equals(String.instancehelper_trim(attributes3.item(index4).getNodeName()), (object) "y")) num2 = Integer.parseInt(attributes3.item(index4).getNodeValue()); } xmlWidget2.setLocation(new Point(num1, num2)); } else if (String.instancehelper_equals(str, (object) "height")) xmlWidget2.setHeight(Integer.parseInt(childNodes2.item(index3).getChildNodes().item(0).getNodeValue())); else if (String.instancehelper_equals(str, (object) "width")) xmlWidget2.setWidth(Integer.parseInt(childNodes2.item(index3).getChildNodes().item(0).getNodeValue())); } System.get_out().println(new StringBuilder().append("\tLocation: [").append((int) xmlWidget2.getLocation().x).append(",").append((int) xmlWidget2.getLocation().y).append("]").append("\n\tSize: (").append((int) xmlWidget2.getSize().width).append(",").append((int) xmlWidget2.getSize().height).append(")").toString()); ((Map) treeMap).put((object) Integer.valueOf((int) xmlWidget2.getLocation().y), (object) xmlWidget2); this.subsystems.put((object) xmlWidget1, (object) treeMap); } } string elementClass = xmlWidget1.getElementClass(); object obj = (object) "livewindow.elements"; CharSequence charSequence1; charSequence1.__\u003Cref\u003E = (__Null) obj; CharSequence charSequence2 = charSequence1; if (!String.instancehelper_contains(elementClass, charSequence2)) this.widgets.add((object) xmlWidget1); } else if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "hidden")) { NamedNodeMap attributes = obj0.item(index1).getAttributes(); for (int index2 = 0; index2 < attributes.getLength(); ++index2) { if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "field")) this.hiddenFields.add((object) attributes.item(index2).getNodeValue()); } } else if (String.instancehelper_equals(obj0.item(index1).getNodeName(), (object) "property")) { NamedNodeMap attributes = obj0.item(index1).getAttributes(); string str1 = (string) null; string str2 = (string) null; for (int index2 = 0; index2 < attributes.getLength(); ++index2) { if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "name")) str1 = attributes.item(index2).getNodeValue(); else if (String.instancehelper_equals(attributes.item(index2).getNodeName(), (object) "value")) str2 = attributes.item(index2).getNodeValue(); } if (str1 != null && str2 != null) this.properties.put((object) str1, (object) str2); } } }