64 |
/* check all associations */ |
/* check all associations */ |
65 |
|
|
66 |
// Right links! |
// Right links! |
67 |
Iterator iter = fen.constgraph.findN_11X_Iter(node, PP.association); |
Iterator iter = fen.constgraph.findN_11X_Iter(node, |
68 |
|
STRUCTLINK.linkedTo); |
69 |
while (iter.hasNext()) { |
while (iter.hasNext()) { |
70 |
Object obj = iter.next(); |
Object obj = iter.next(); |
71 |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
72 |
Pair anchor = new Pair(plane, getRect(obj)); |
Pair anchor = new Pair(plane, getRect(obj)); |
73 |
if (dbg) pa("rect:"+getRect(obj)); |
if (dbg) pa("rect:"+getRect(obj)); |
74 |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
75 |
} |
} |
76 |
|
|
77 |
// Left links! |
// Left links! |
78 |
iter = fen.constgraph.findN_X11_Iter(PP.association, node); |
iter = fen.constgraph.findN_X11_Iter(STRUCTLINK.linkedTo, node); |
79 |
while (iter.hasNext()) { |
while (iter.hasNext()) { |
80 |
Object obj = iter.next(); |
Object obj = iter.next(); |
81 |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
82 |
Pair anchor = new Pair(plane, getRect(obj)); |
Pair anchor = new Pair(plane, getRect(obj)); |
83 |
if (dbg) pa("rect:"+getRect(obj)); |
if (dbg) pa("rect:"+getRect(obj)); |
84 |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor); |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor); |
89 |
public int dx = 30, dy = 30; |
public int dx = 30, dy = 30; |
90 |
protected java.awt.Rectangle getRect(Object node) { |
protected java.awt.Rectangle getRect(Object node) { |
91 |
if (node == null) throw new Error("Impossible!"); |
if (node == null) throw new Error("Impossible!"); |
92 |
int x = RDFUtil.getInt(fen, node, SPATIAL.coordX); |
int x = RDFUtil.getInt(fen, node, CANVAS2D.x); |
93 |
int y = RDFUtil.getInt(fen, node, SPATIAL.coordY); |
int y = RDFUtil.getInt(fen, node, CANVAS2D.y); |
94 |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
95 |
return new java.awt.Rectangle(x-dx, y-dy, |
return new java.awt.Rectangle(x-dx, y-dy, |
96 |
(int)p.getWidth()+dx+dx, |
(int)p.getWidth()+dx+dx, |