StringBuffer pointbuf = new StringBuffer(); XMLUtil.printIndent(writer, indent + 1); pointbuf.append("<routing"); pointbuf.append(" id=\"").append(id).append('\"'); pointbuf.append(" x=\"").append(((Point)routingPoints.get(i)).x).append('\"'); pointbuf.append(" y=\"").append(((Point)routingPoints.get(i)).y).append('\"'); pointbuf.append("/>"); writer.println(pointbuf.toString());
writer.println('>'); for(int i = 0; i < routingPoints.size(); i++) { StringBuffer pointbuf = new StringBuffer(); XMLUtil.printIndent(writer, indent + 1); pointbuf.append("<routing"); pointbuf.append(" id=\"").append(id).append('\"'); pointbuf.append(" x=\"").append(((Point)routingPoints.get(i)).x).append('\"'); pointbuf.append(" y=\"").append(((Point)routingPoints.get(i)).y).append('\"'); pointbuf.append("/>"); writer.println(pointbuf.toString()); } XMLUtil.printIndent(writer, indent++); writer.println("</connector>");
  public void writeXML(PrintWriter writer, int indent)  {    XMLUtil.printIndent(writer, indent);    StringBuffer buf = new StringBuffer();    buf.append("<connector ");    buf.append("id=\"").append(id).append('\"');    buf.append(" linewidth=\"").append(lineWidth).append('\"');    buf.append(" color=\"").append(color).append('\"');    buf.append(" labelx=\"").append(labelPos.getX()).append('\"');    buf.append(" labely=\"").append(labelPos.getY()).append('\"');    buf.append('>');    writer.println(buf.toString());    for(int i = 0; i < routingPoints.size(); i++)    {      StringBuffer pointbuf = new StringBuffer();      XMLUtil.printIndent(writer, indent + 1);      pointbuf.append("<routing");      pointbuf.append(" id=\"").append(id).append('\"');      pointbuf.append(" x=\"").append(((Point)routingPoints.get(i)).x).append('\"');      pointbuf.append(" y=\"").append(((Point)routingPoints.get(i)).y).append('\"');      pointbuf.append("/>");      writer.println(pointbuf.toString());    }    XMLUtil.printIndent(writer, indent++);    writer.println("</connector>");  }