3 |
package gzz.view.buoy; |
package gzz.view.buoy; |
4 |
import gzz.view.*; |
import gzz.view.*; |
5 |
import gzz.vob.*; |
import gzz.vob.*; |
6 |
|
import gzz.util.*; |
7 |
import gzz.*; |
import gzz.*; |
8 |
|
|
9 |
/** Make the kinds of links familiar from PP structure. |
/** Make the kinds of links familiar from PP structure. |
22 |
private Dim d_clone; |
private Dim d_clone; |
23 |
private Dim d_assoc; |
private Dim d_assoc; |
24 |
|
|
25 |
void doLinks(Cell c, VobScene vs, int cs, |
public void doLinks(Cell c, VobScene vs, int cs, |
26 |
BuoyViewNodeType cellNodeType, |
BuoyViewNodeType cellNodeType, |
27 |
BuoyLinkListener l) { |
BuoyLinkListener l) { |
28 |
// XXX Right? Allow only main cell to link? |
// XXX Right? Allow only main cell to link? |
34 |
if(dbg) pa("PPLinker: LINKS "+c+" "+left+" "+right); |
if(dbg) pa("PPLinker: LINKS "+c+" "+left+" "+right); |
35 |
if(right != null) { |
if(right != null) { |
36 |
Cell rl = right.h(d_clone); |
Cell rl = right.h(d_clone); |
37 |
l.link(1, cs, cellNodeType, new Pair(c, rl)); |
l.link(1, cs, cellNodeType, new Pair(c, rl), rl); |
38 |
} |
} |
39 |
if(left != null) { |
if(left != null) { |
40 |
Cell ll = left.h(d_clone); |
Cell ll = left.h(d_clone); |
41 |
l.link(-1, cs, cellNodeType, new Pair(ll, c)); |
l.link(-1, cs, cellNodeType, new Pair(ll, c), ll); |
42 |
} |
} |
43 |
} |
} |
44 |
} |
} |