94 |
Object obj = iter.next(); |
Object obj = iter.next(); |
95 |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
96 |
if (container == plane) continue; |
if (container == plane) continue; |
97 |
Object anchor = new Triple(plane, getRect(obj), obj); |
Object anchor = getAnchor(plane, obj); |
98 |
if (dbg) pa("rect:"+getRect(obj)); |
if (dbg) pa("rect:"+anchor); |
99 |
l.link(1, cs, nodeType, new Pair(node, obj), anchor, shift); |
l.link(1, cs, nodeType, new Pair(node, obj), anchor, shift); |
100 |
shift++; |
shift++; |
101 |
} |
} |
107 |
Object obj = iter.next(); |
Object obj = iter.next(); |
108 |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
Object plane = fen.constgraph.find1_X11(CANVAS2D.contains, obj); |
109 |
if (container == plane) continue; |
if (container == plane) continue; |
110 |
Object anchor = new Triple(plane, getRect(obj), obj); |
Object anchor = getAnchor(plane, obj); |
111 |
if (dbg) pa("rect:"+getRect(obj)); |
if (dbg) pa("rect:"+anchor); |
112 |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor, shift); |
l.link(-1, cs, nodeType, new Pair(obj, node), anchor, shift); |
113 |
shift++; |
shift++; |
114 |
} |
} |
116 |
} |
} |
117 |
|
|
118 |
public int dx = 30, dy = 30; |
public int dx = 30, dy = 30; |
119 |
protected java.awt.Rectangle getRect(Object node) { |
protected View2D.Anchor getAnchor(Object plane, Object node) { |
120 |
if (node == null) throw new Error("Impossible!"); |
if (node == null) throw new Error("Impossible!"); |
121 |
float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x); |
float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x); |
122 |
float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y); |
float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y); |
123 |
org.nongnu.libvob.lava.placeable.Placeable p = |
org.nongnu.libvob.lava.placeable.Placeable p = |
124 |
(org.nongnu.libvob.lava.placeable.Placeable)nodeView.f(fen.constgraph, node); |
(org.nongnu.libvob.lava.placeable.Placeable)nodeView.f(fen.constgraph, node); |
125 |
return new java.awt.Rectangle((int)(x-dx), (int)(y-dy), |
return new View2D.Anchor(plane, |
126 |
(int)p.getWidth()+dx+dx, |
x-dx, y-dy, |
127 |
(int)p.getHeight()+dy+dy); |
p.getWidth()+dx+dx, |
128 |
|
p.getHeight()+dy+dy, |
129 |
|
node); |
130 |
} |
} |
131 |
} |
} |