@@ -0,0 +1,923 @@
+package de.lmu.ifi.dbs.elki.visualization.batikutil;%0A%0Aimport org.w3c.dom.Element;%0A%0Aimport de.lmu.ifi.dbs.elki.visualization.svg.SVGPlot;%0A%0A/**%0A * This helper class will replace a node in an SVG plot,%0A * as soon as the tree is unlocked by the rendering engine.%0A * %0A * @author Erich Schubert%0A *%0A */%0Apublic class NodeReplacer extends RunWhenReadyAndVisible %7B%0A  private SVGPlot plot;%0A  private String id;%0A  private Element newe;%0A  %0A  /**%0A   * Setup a SVG node replacement.%0A   * %0A   * @param newe New element%0A   * @param plot SVG plot to process%0A   * @param id Node ID to replace%0A   */%0A  public NodeReplacer(Element newe, SVGPlot plot, String id) %7B%0A    super();%0A    this.newe = newe;%0A    this.plot = plot;%0A    this.id = id;%0A  %7D%0A%0A  @Override%0A  public void run() %7B%0A    Element olde = plot.getIdElement(id);%0A    if (olde != null) %7B%0A      olde.getParentNode().replaceChild(newe, olde);%0A      plot.putIdElement(id, newe);%0A    %7D%0A  %7D%0A%7D%0A

Add Batik helper to replace a named node in the SVG tree.