59 |
Object obj = iter.next(); |
Object obj = iter.next(); |
60 |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
61 |
Pair anchor = new Pair(plane, getRect(obj)); |
Pair anchor = new Pair(plane, getRect(obj)); |
62 |
|
if (dbg) pa("rect:"+getRect(obj)); |
63 |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
l.link(1, cs, nodeType, new Pair(node, obj), anchor); |
64 |
} |
} |
65 |
|
|
69 |
Object obj = iter.next(); |
Object obj = iter.next(); |
70 |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
Object plane = fen.constgraph.find1_X11(PAPER.contains, obj); |
71 |
Pair anchor = new Pair(plane, getRect(obj)); |
Pair anchor = new Pair(plane, getRect(obj)); |
72 |
|
if (dbg) pa("rect:"+getRect(obj)); |
73 |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor); |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor); |
74 |
} |
} |
75 |
} |
} |
77 |
|
|
78 |
public int dx = -100, dy = -200, w = 400, h = 400; |
public int dx = -100, dy = -200, w = 400, h = 400; |
79 |
protected java.awt.Rectangle getRect(Object node) { |
protected java.awt.Rectangle getRect(Object node) { |
80 |
|
if (node == null) throw new Error("Impossible!"); |
81 |
int x = RDFUtil.getInt(fen, node, SPATIAL.coordX); |
int x = RDFUtil.getInt(fen, node, SPATIAL.coordX); |
82 |
int y = RDFUtil.getInt(fen, node, SPATIAL.coordY); |
int y = RDFUtil.getInt(fen, node, SPATIAL.coordY); |
83 |
return new java.awt.Rectangle(x+dx, y+dy, w, h); |
return new java.awt.Rectangle(x+dx, y+dy, w, h); |