private void write(RootContainer rootContainer, Element element) { addAttribute(element, "name", ((NamedElement) rootContainer.getSemanticElement()).getName()); addAttribute(element, "width", Integer.toString(rootContainer.getDimension().width)); addAttribute(element, "height", Integer.toString(rootContainer.getDimension().height)); Iterator iter = rootContainer.getNodes().iterator(); while (iter.hasNext()) { write("\n ", (Node) iter.next(), element); } }
protected void addDimension( RootContainer processDefinitionNotationElement, Element processDiagramInfo) { String width = getAttribute(processDiagramInfo, "width"); String height = getAttribute(processDiagramInfo, "height"); Dimension dimension = new Dimension( width == null ? 0 : Integer.valueOf(width).intValue(), height == null ? 0 : Integer.valueOf(height).intValue()); processDefinitionNotationElement.setDimension(dimension); }