gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gzz/view/buoy BuoyAdaptor.java PPLinker.java


From: Matti Katila
Subject: [Gzz-commits] gzz/gzz/view/buoy BuoyAdaptor.java PPLinker.java
Date: Fri, 07 Feb 2003 03:33:43 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   03/02/07 03:33:43

Modified files:
        gzz/view/buoy  : BuoyAdaptor.java PPLinker.java 

Log message:
        fixed pp buoys..

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/BuoyAdaptor.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/PPLinker.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text

Patches:
Index: gzz/gzz/view/buoy/BuoyAdaptor.java
diff -u gzz/gzz/view/buoy/BuoyAdaptor.java:1.8 
gzz/gzz/view/buoy/BuoyAdaptor.java:1.9
--- gzz/gzz/view/buoy/BuoyAdaptor.java:1.8      Thu Feb  6 07:41:16 2003
+++ gzz/gzz/view/buoy/BuoyAdaptor.java  Fri Feb  7 03:33:43 2003
@@ -76,8 +76,6 @@
        }
     }
 
-
-
 }
 
 
Index: gzz/gzz/view/buoy/PPLinker.java
diff -u gzz/gzz/view/buoy/PPLinker.java:1.3 gzz/gzz/view/buoy/PPLinker.java:1.4
--- gzz/gzz/view/buoy/PPLinker.java:1.3 Tue Feb  4 21:31:24 2003
+++ gzz/gzz/view/buoy/PPLinker.java     Fri Feb  7 03:33:43 2003
@@ -13,36 +13,46 @@
  * The real clone dimension may be used; however, currently,
  * this only links between rootclones so it 
  * is not possible to clone the cell to another paper.
+ *
+ * mudyc> What's this for? PP has never in my time done links like this.
+ *    I fix this..
  */
 public class PPLinker implements CellBuoyViewLinker {
-public static final String rcsid = "$Id: PPLinker.java,v 1.3 2003/02/05 
02:31:24 mudyc Exp $";
+public static final String rcsid = "$Id: PPLinker.java,v 1.4 2003/02/07 
08:33:43 mudyc Exp $";
     public static boolean dbg = true;
-    private static void pa(String s) { System.err.println(s); }
+    private static void pa(String s) { System.out.println("PPLinker:"+s); }
 
     private Dim d_clone;
     private Dim d_assoc;
-    public PPLinker(Dim d_clone, Dim d_assoc) {
+    private Dim d_contains;
+    public PPLinker(Dim d_clone, Dim d_assoc, Dim d_contains) {
        this.d_clone = d_clone;
        this.d_assoc = d_assoc;
+       this.d_contains = d_contains;
     }
 
     public void doLinks(Cell c, VobScene vs, int cs, 
                            BuoyViewNodeType cellNodeType, 
                            BuoyLinkListener l) {
+
        // XXX Right? Allow only main cell to link?
-       if(c.s(d_clone, -1) != null) return;
+       // no, absolutely wrong. d.contains can link and the paper,root, can 
not.
+       // <sigh> if(c.s(d_clone, -1) != null) return;
 
-       for(Cell assoc = c; assoc != null; assoc = assoc.s(d_clone)) {
-           Cell left = assoc.s(d_assoc, -1);
-           Cell right = assoc.s(d_assoc, 1);
-           if(dbg) pa("PPLinker: LINKS "+c+" "+left+" "+right);
-           if(right != null) {
-               Cell rl = right.h(d_clone);
-               l.link(1, cs, cellNodeType, new Pair(c, rl), rl);
-           }
-           if(left != null) {
-               Cell ll = left.h(d_clone);
-               l.link(-1, cs, cellNodeType, new Pair(ll, c), ll);
+       Cell note = c.h(d_contains).s(d_contains);
+       for (; note != null; note = note.s(d_contains)) {
+           for(Cell assoc = note; assoc != null; assoc = assoc.s(d_clone)) {
+               Cell left = assoc.s(d_assoc, -1);
+               Cell right = assoc.s(d_assoc, 1);
+               if(dbg) pa("LINKS "+c+" "+left+" "+right);
+               if(right != null) {
+                   Cell rl = right.h(d_clone);
+                   l.link(1, cs, cellNodeType, new Pair(c, rl), rl);
+               }
+               if(left != null) {
+                   Cell ll = left.h(d_clone);
+                   l.link(-1, cs, cellNodeType, new Pair(ll, c), ll);
+               }
            }
        }
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]