25 |
private Fen fen; |
private Fen fen; |
26 |
private Object relation; |
private Object relation; |
27 |
|
|
28 |
|
private Object key = "TTConnection"; |
29 |
|
|
30 |
public AbstractNodeType2D pageImageScrollNodeType; |
public AbstractNodeType2D pageImageScrollNodeType; |
31 |
public AbstractNodeType2D normalNodeNodeType; |
public AbstractNodeType2D normalNodeNodeType; |
32 |
|
|
35 |
this.relation = relation; |
this.relation = relation; |
36 |
} |
} |
37 |
|
|
38 |
private void addBuoy(VobScene vs, Object node, int direction, |
|
39 |
|
private void addBuoy(VobScene vs, Object linkId, |
40 |
|
Object node, int direction, |
41 |
|
int index, |
42 |
BuoyLinkListener l) { |
BuoyLinkListener l) { |
43 |
String s = Nodes.toString(node); |
String s = Nodes.toString(node); |
44 |
|
Object plane; |
45 |
|
BuoyViewNodeType nodeType; |
46 |
if(s.startsWith("urn:x-storm:1.0:application/pdf") || |
if(s.startsWith("urn:x-storm:1.0:application/pdf") || |
47 |
s.startsWith("urn:x-storm:1.0:application/postscript")) { |
s.startsWith("urn:x-storm:1.0:application/postscript")) { |
48 |
if(dbg) p("Got "+s+" was pagescroll " + direction); |
if(dbg) p("Got "+s+" was pagescroll " + direction); |
49 |
|
plane = fen.alph.getScrollBlock(s); |
50 |
|
nodeType = pageImageScrollNodeType; |
51 |
} else { |
} else { |
52 |
if(dbg) p("Got "+s+" was plane " + direction); |
if(dbg) p("Got "+s+" was plane " + direction); |
53 |
|
plane = node; |
54 |
|
nodeType = normalNodeNodeType; |
55 |
} |
} |
56 |
|
View2D.Anchor anchor = new View2D.Anchor( |
57 |
|
plane, 0, 0, 0, 0, null); |
58 |
|
l.link(direction, -1, nodeType, linkId, anchor, index); |
59 |
} |
} |
60 |
|
|
61 |
public void addBuoys(VobScene vs, int parentCs, |
public void addBuoys(VobScene vs, int parentCs, |
80 |
node = plane; |
node = plane; |
81 |
} |
} |
82 |
|
|
83 |
|
int index = 0; |
84 |
|
|
85 |
for( |
for( |
86 |
Iterator ileft = fen.constgraph.findN_11X_Iter(node, relation); |
Iterator ileft = fen.constgraph.findN_11X_Iter(node, relation); |
87 |
ileft.hasNext();) { |
ileft.hasNext();) { |
88 |
Object linknode = ileft.next(); |
Object linknode = ileft.next(); |
89 |
addBuoy(vs, linknode, -1, l); |
addBuoy(vs, |
90 |
|
new Triple(this.key, node, linknode), |
91 |
|
linknode, -1, index, l); |
92 |
|
index++; |
93 |
} |
} |
94 |
|
|
95 |
|
index = 0; |
96 |
|
|
97 |
for( |
for( |
98 |
Iterator iright = fen.constgraph.findN_X11_Iter(relation, node); |
Iterator iright = fen.constgraph.findN_X11_Iter(relation, node); |
99 |
iright.hasNext();) { |
iright.hasNext();) { |
100 |
Object linknode = iright.next(); |
Object linknode = iright.next(); |
101 |
addBuoy(vs, linknode, 1, l); |
addBuoy(vs, |
102 |
|
new Triple(this.key, node, linknode), |
103 |
|
linknode, 1, index, l); |
104 |
|
index++; |
105 |
} |
} |
106 |
|
|
107 |
|
|