final XMLElement edgeSet = new XMLElement("EDGESET");
tglbXML.addChild(edgeSet);
TGForEachEdge fee = new TGForEachEdge() {
public void forEachEdge( Edge edge ) {
LBEdge lbEdge = (LBEdge) edge;
XMLElement edgeElt = new XMLElement("EDGE");
edgeElt.setAttribute("fromID", lbEdge.getFrom().getID());
edgeElt.setAttribute("toID", lbEdge.getTo().getID());
edgeElt.setAttribute("type", ""+lbEdge.getType());
edgeElt.setAttribute("length", ""+(int) lbEdge.getLength());
edgeElt.setAttribute("visible", lbEdge.isVisible() ? "true" : "false");
edgeElt.setAttribute("color", encodeColor(lbEdge.getColor()));
edgeSet.addChild(edgeElt);
}
};
graphEltSet.forAllEdges(fee);