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 |
|
|
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 |
} |
} |
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 |
} |
} |