/[fenfire]/fenfire/org/fenfire/view/buoy/TransclusionConnector.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/buoy/TransclusionConnector.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by mudyc, Mon Aug 4 06:02:48 2003 UTC revision 1.22 by tjl, Fri Aug 15 09:35:07 2003 UTC
# Line 83  public static final String rcsid = "$Id$ Line 83  public static final String rcsid = "$Id$
83          }          }
84      }      }
85    
86        /** A link id, for reaching the node from the buoy.
87         */
88        public class LinkId {
89            public LinkId(Object node, PageScrollBlock scrollBlock) {
90                this.node = node;
91                this.scrollBlock = scrollBlock;
92            }
93            /** The Fen node that contains the transclusion.
94             */
95            public final Object node;
96            /** The scrollblock from which the transclusion comes.
97             */
98            public final PageScrollBlock scrollBlock;
99    
100            public int hashCode() {
101                return
102                    (node.hashCode()*317501) ^
103                    (scrollBlock.hashCode()*1941);
104            }
105    
106            public boolean equals(Object o) {
107                if(!(o instanceof LinkId)) return false;
108                LinkId p = (LinkId)o;
109                // Nodes can be compared with ==
110                return node == p.node && scrollBlock.equals(p.scrollBlock);
111            }
112    
113        }
114    
115      NodeFunction scrollBlockForNode ;      NodeFunction scrollBlockForNode ;
116    
117    
# Line 118  public static final String rcsid = "$Id$ Line 147  public static final String rcsid = "$Id$
147                  if(culledCS > 0) cs = culledCS;                  if(culledCS > 0) cs = culledCS;
148    
149                  l.link(1, cs, pageImageScrollNodeType,                  l.link(1, cs, pageImageScrollNodeType,
150                              new Pair(node, ((View2D.Anchor)anchor).plane),                      new LinkId(node,
151                            ((PageScrollBlock)((View2D.Anchor)anchor).plane)),
152                              anchor);                              anchor);
153    
154              }              }
# Line 146  public static final String rcsid = "$Id$ Line 176  public static final String rcsid = "$Id$
176                      }                      }
177                      Object anchor = getAnchor(plane, node);                      Object anchor = getAnchor(plane, node);
178                      l.link(-1, cs, normalNodeNodeType,                      l.link(-1, cs, normalNodeNodeType,
179                              new Pair(node, span.getScrollBlock()),                              new LinkId(node,
180                                    (PageScrollBlock)span.getScrollBlock()),
181                              anchor);                              anchor);
182    
183                  }                  }

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26