gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] fenfire/org/fenfire/view/buoy TransclusionConne...


From: Matti Katila
Subject: [Gzz-commits] fenfire/org/fenfire/view/buoy TransclusionConne...
Date: Thu, 31 Jul 2003 07:39:11 -0400

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Branch:         
Changes by:     Matti Katila <address@hidden>   03/07/31 07:39:11

Modified files:
        org/fenfire/view/buoy: TransclusionConnector.java 

Log message:
        ok, connectors fixed

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/view/buoy/TransclusionConnector.java.diff?tr1=1.19&tr2=1.20&r1=text&r2=text

Patches:
Index: fenfire/org/fenfire/view/buoy/TransclusionConnector.java
diff -u fenfire/org/fenfire/view/buoy/TransclusionConnector.java:1.19 
fenfire/org/fenfire/view/buoy/TransclusionConnector.java:1.20
--- fenfire/org/fenfire/view/buoy/TransclusionConnector.java:1.19       Wed Jul 
30 11:46:45 2003
+++ fenfire/org/fenfire/view/buoy/TransclusionConnector.java    Thu Jul 31 
07:39:10 2003
@@ -44,9 +44,9 @@
 /** Hang transclusion buoys.
  */
 public class TransclusionConnector implements BuoyViewConnector {
-public static final String rcsid = "$Id: TransclusionConnector.java,v 1.19 
2003/07/30 15:46:45 mudyc Exp $";
+public static final String rcsid = "$Id: TransclusionConnector.java,v 1.20 
2003/07/31 11:39:10 mudyc Exp $";
     public static boolean dbg = false;
-    private static void pa(String s) { 
System.out.println("TransclusionConnector:: "+s); }
+    private static void p(String s) { 
System.out.println("TransclusionConnector:: "+s); }
 
 
     private Fen fen;
@@ -100,25 +100,21 @@
        if(!(mainNode instanceof AbstractMainNode2D)) return;
        AbstractMainNode2D mn2d = (AbstractMainNode2D)mainNode;
        DefaultVobMatcher m = (DefaultVobMatcher)vs.matcher;
-       if(dbg) pa("Trying transclusion addbuoys");
+       if(dbg) p("Trying transclusion addbuoys");
        if(mn2d.getView2D() == normalNodeNodeType.getView2D()) {
-           if (dbg) 
-               pa("TransclusionConnector: canvas -> scrolls");
+           if (dbg) p("TransclusionConnector: canvas -> scrolls");
+
            // Loop over the placed nodes' keys
-           for(Iterator i=m.getKeys(parentCs).iterator(); i.hasNext();) {
-               Object key = i.next();
-               if(!(key instanceof Pair)) continue;
-               Pair pair = (Pair)key;
-               Object node = pair.second;
+            int containerCS = CanvasView2D.getContainerCS(vs, parentCs);
 
+            for(Iterator i=m.getKeys(containerCS).iterator(); i.hasNext();) {
+                Object node = i.next();
 
-               Object anchor = this.scrollBlockForNode.f(fen.constgraph, 
-                                       node);
-               if(dbg) 
-                   pa("Transclcon:: "+key+" "+pair.second+" "+anchor);
+               View2D.Anchor anchor = 
(View2D.Anchor)this.scrollBlockForNode.f(fen.constgraph, node);
+               if(dbg) p("node: "+node+", anchor: "+anchor);
                if(anchor == null) continue;
 
-               int cs =m.getCS(parentCs, key);
+               int cs =m.getCS(containerCS, node);
                int culledCS = m.getCS(cs, "CULL");
                if(culledCS > 0) cs = culledCS;
 
@@ -130,23 +126,23 @@
 
        } else if(mn2d.getView2D() == pageImageScrollNodeType.getView2D()) {
            if (dbg) 
-               pa("TransclusionConnector: Pagescroll -> outside");
+               p("TransclusionConnector: Pagescroll -> outside");
            for(Iterator i=m.getKeys(parentCs).iterator(); i.hasNext();) {
                Object key = i.next();
                if(!(key instanceof PageImageSpan)) continue;
                PageImageSpan span = (PageImageSpan)key;
 
-               if(dbg) pa("TRC: span "+key);
+               if(dbg) p("TRC: span "+key);
                int cs =m.getCS(parentCs, key);
 
                Enfilade1D tmpEnf = fen.enfMaker.makeEnfilade(span);
                for(Iterator nodes = 
fen.enfiladeOverlap.getMatches(tmpEnf).iterator(); nodes.hasNext(); ) {
                    Object node = nodes.next();
-                   if(dbg) pa("TRC: overlap "+node);
+                   if(dbg) p("TRC: overlap "+node);
                    Object plane = fen.constgraph.find1_X11(
                            CANVAS2D.contains, node);
                    if(plane == null) {
-                       if(dbg) pa("No plane!");
+                       if(dbg) p("No plane!");
                        continue;
                    }
                    Object anchor = getAnchor(plane, node);
@@ -157,7 +153,7 @@
                }
            }
        } else {
-           if(dbg) pa("TransclusionConnector: Unknown view2d type");
+           if(dbg) p("TransclusionConnector: Unknown view2d type");
        }
     }
 




reply via email to

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