89 |
|
|
90 |
public TransclusionConnector(Fen fen, NodeFunction nodeView) { |
public TransclusionConnector(Fen fen, NodeFunction nodeView) { |
91 |
this.fen = fen; |
this.fen = fen; |
92 |
this.scrollBlockForNode = new CachedNodeFunction(1000, |
this.scrollBlockForNode = new FlushableCachedNodeFunction(1000, |
93 |
fen.constgraph, new SB4Node()); |
fen, new SB4Node()); |
94 |
this.nodeView = nodeView; |
this.nodeView = nodeView; |
95 |
} |
} |
96 |
|
|
164 |
public int dx = 30, dy = 30; |
public int dx = 30, dy = 30; |
165 |
protected java.awt.Rectangle getRect(Object node) { |
protected java.awt.Rectangle getRect(Object node) { |
166 |
if (node == null) throw new Error("Impossible!"); |
if (node == null) throw new Error("Impossible!"); |
167 |
int x = RDFUtil.getInt(fen.graph, node, CANVAS2D.x); |
float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x); |
168 |
int y = RDFUtil.getInt(fen.graph, node, CANVAS2D.y); |
float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y); |
169 |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
170 |
return new java.awt.Rectangle(x-dx, y-dy, |
return new java.awt.Rectangle((int)(x-dx), (int)(y-dy), |
171 |
(int)p.getWidth()+dx+dx, |
(int)p.getWidth()+dx+dx, |
172 |
(int)p.getHeight()+dy+dy); |
(int)p.getHeight()+dy+dy); |
173 |
} |
} |