private String toXML(String tagText) { String xmlRetString = ""; String xmlCodeable = codeable ? "" : "codeable=\"false\" "; String xmlExpanded = expanded ? "" : "expanded=\"false\""; xmlRetString += "\t\t<" + tagText + " id=\"" + rowID + "\" " + xmlCodeable + xmlExpanded + ">\n"; xmlRetString += "\t\t\t<label>" + label.replaceFirst(rowID, "").trim() + "</label>\n"; if (!usesDefaultStructure) { xmlRetString += "\t\t\t\t<treeStructures>\n"; for (int i = 0; i < myStructures.size(); i++) xmlRetString += myStructures.getStructure(i).toXML() + "\n"; xmlRetString += "\t\t\t\t</treeStructures>\n"; } if (hasChild()) { for (int j = 0; j < children.size(); j++) { xmlRetString += ((SISRow) children.get(j)).toXML("child"); } } xmlRetString += "\t\t</" + tagText + ">\n"; return xmlRetString; }
// Overrides Display's version public ArrayList getMyWidgets() { ArrayList retWidgets = new ArrayList(); for (int i = 0; i < myStructures.size(); i++) { if (!codeable) myStructures.getStructure(i).hideWidgets(); retWidgets.add(myStructures.getStructure(i).generate()); } return retWidgets; }
public Widget getMyWidgetsAsFlexTable() { FlexTable table = new FlexTable(); int insert = 0; for (int i = 0; i < myStructures.size(); i++) { Structure current = myStructures.getStructure(i); if (!codeable) current.hideWidgets(); table.setWidget(0, insert++, current.generate()); } return table; }
public String toThinXML() { String xmlRetString = ""; for (int i = 0; i < myStructures.size(); i++) { String temp = myStructures.getStructure(i).toXML(); if (temp != "") { xmlRetString += "<treeItem id=\"" + rowID + ">\n"; xmlRetString += temp; xmlRetString += "</treeItem>\n"; } } if (hasChild()) { for (int j = 0; j < children.size(); j++) { xmlRetString += ((SISRow) children.get(j)).toThinXML(); } } return xmlRetString; }
public SISRow(Structure structure) { children = new ArrayList(); myStructures = new StructureCollection(); if (structure.getStructureType().equalsIgnoreCase(XMLUtils.STRUCTURE_COLLECTION)) { ((SISStructureCollection) structure).setDisplayType(SISStructureCollection.FLEXTABLE); for (int i = 0; i < ((SISStructureCollection) structure).getStructures().size(); i++) { // SysDebugger.getInstance().println("This is a " + // ((SISStructureCollection // )structure).getStructureAt(i).getStructureType()); if ((((SISStructureCollection) structure).getStructureAt(i)) .getStructureType() .equalsIgnoreCase(XMLUtils.RELATED_STRUCTURE)) { ((SISRelatedStructures) (((SISStructureCollection) structure).getStructureAt(i))) .setDisplayType(SISRelatedStructures.FLEXTABLE_NODESCRIPTION); } } } myStructures.add(structure); }
public void enableStructures() { for (int i = 0; i < myStructures.size(); i++) myStructures.getStructure(i).enable(); if (hasChild()) for (int j = 0; j < children.size(); j++) ((SISRow) children.get(j)).enableStructures(); }