public Point2D getAnchorPosition(DerivationViewer.AnchorType type) {
   switch (type) {
     case ANCHOR_ROOT:
       return transform(root);
     case ANCHOR_LEFTMOST_LEAF:
       Node n = root;
       while (graph.getSuccessorCount(n) != 0) n = (Node) graph.getSuccessors(n).toArray()[0];
       return transform(n);
     default:
       return new Point2D.Double(0, 0);
   }
 }