44 |
if(!(next instanceof Pair)) continue; |
if(!(next instanceof Pair)) continue; |
45 |
Pair pair = (Pair)next; |
Pair pair = (Pair)next; |
46 |
int cs = m.getCS(parentCs, pair); |
int cs = m.getCS(parentCs, pair); |
47 |
|
int culledCS = m.getCS(cs, "CULL"); |
48 |
|
if(culledCS > 0) cs = culledCS; |
49 |
|
|
50 |
Object container = pair.first; |
Object container = pair.first; |
51 |
Object node = pair.second; |
Object node = pair.second; |
57 |
while (iter.hasNext()) { |
while (iter.hasNext()) { |
58 |
Object obj = iter.next(); |
Object obj = iter.next(); |
59 |
Object plane = fen.constgraph.find1_X11(PP.contains, obj); |
Object plane = fen.constgraph.find1_X11(PP.contains, obj); |
60 |
Pair anchor = new Pair(plane, getRect(node)); |
Pair anchor = new Pair(plane, getRect(obj)); |
61 |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
62 |
} |
} |
63 |
|
|
64 |
// Left links! |
// Left links! |
65 |
iter = fen.constgraph.findN_X11_Iter(PP.association, node); |
iter = fen.constgraph.findN_X11_Iter(PP.association, node); |
66 |
while (iter.hasNext()) { |
while (iter.hasNext()) { |
67 |
Object sub = iter.next(); |
Object obj = iter.next(); |
68 |
Object plane = fen.constgraph.find1_X11(PP.contains, sub); |
Object plane = fen.constgraph.find1_X11(PP.contains, obj); |
69 |
Pair anchor = new Pair(plane, getRect(node)); |
Pair anchor = new Pair(plane, getRect(obj)); |
70 |
l.link(-1, cs, nodeType, new Pair(sub, node), anchor); |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor); |
71 |
} |
} |
72 |
} |
} |
73 |
} |
} |
74 |
|
|
75 |
|
public int dx = -100, dy = -200, w = 400, h = 400; |
76 |
protected java.awt.Rectangle getRect(Object node) { |
protected java.awt.Rectangle getRect(Object node) { |
77 |
int x = RDFUtil.getInt(fen, node, SPATIAL.coordX); |
int x = RDFUtil.getInt(fen, node, SPATIAL.coordX); |
78 |
int y = RDFUtil.getInt(fen, node, SPATIAL.coordY); |
int y = RDFUtil.getInt(fen, node, SPATIAL.coordY); |
79 |
return new java.awt.Rectangle(x-20, y-20, 240, 140); |
return new java.awt.Rectangle(x+dx, y+dy, w, h); |
80 |
} |
} |
81 |
} |
} |