Exemple #1
0
 public void clipLongStreets() {
   @SuppressWarnings("unchecked")
   Vector<LayoutNode> set2 = (Vector<LayoutNode>) set().clone();
   for (Enumeration<LayoutNode> e = set2.elements(); e.hasMoreElements(); ) {
     LayoutNode p = e.nextElement();
     if (isUsed(p) && p.isStreetLike())
       for (int d = 0; d < 4; d++)
         if (p.getLink(d) == null) {
           LayoutNode p2 = getNextNode(p, d);
           if ((p2 != null) && (!p.links().containsValue(p2))) {
             Enumeration<LayoutNode> nodes = p.links().elements();
             LayoutNode p_1 = nodes.nextElement();
             LayoutNode p_2 = nodes.nextElement();
             p.deLink();
             p_1.crossLink(p_2);
             unUse(p);
             LayoutNode p3 = makeNextNode(p2, Directions.getOpDirectionCode(d));
             p2.crossLink(p3);
             use(p3, LayoutTypes.leaf);
             break;
           }
         }
   }
 }