45 |
/** Hang transclusion buoys. |
/** Hang transclusion buoys. |
46 |
*/ |
*/ |
47 |
public class TransclusionConnector implements BuoyViewConnector { |
public class TransclusionConnector implements BuoyViewConnector { |
48 |
|
<<<<<<< TransclusionConnector.java |
49 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
50 |
|
======= |
51 |
|
public static final String rcsid = "$Id$"; |
52 |
|
>>>>>>> 1.14 |
53 |
public static boolean dbg = false; |
public static boolean dbg = false; |
54 |
private static void pa(String s) { System.out.println("TransclusionConnector:: "+s); } |
private static void pa(String s) { System.out.println("TransclusionConnector:: "+s); } |
55 |
|
|
165 |
} |
} |
166 |
} |
} |
167 |
|
|
168 |
public int dx = 30, dy = 30; |
public float mx = 1.1f, my = 1.1f; |
169 |
protected java.awt.Rectangle getRect(Object node) { |
protected java.awt.Rectangle getRect(Object node) { |
170 |
if (node == null) throw new Error("Impossible!"); |
if (node == null) throw new Error("Impossible!"); |
171 |
float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x); |
float x = RDFUtil.getFloat(fen.graph, node, CANVAS2D.x); |
172 |
float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y); |
float y = RDFUtil.getFloat(fen.graph, node, CANVAS2D.y); |
173 |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
Placeable p = (Placeable)nodeView.f(fen.constgraph, node); |
174 |
return new java.awt.Rectangle((int)(x-dx), (int)(y-dy), |
float w = p.getWidth(); |
175 |
(int)p.getWidth()+dx+dx, |
float h = p.getHeight(); |
176 |
(int)p.getHeight()+dy+dy); |
int bw = (int)(mx * w); |
177 |
|
int bh = (int)(my * h); |
178 |
|
return new java.awt.Rectangle((int)(x-bw), (int)(y-bh), |
179 |
|
(int)w+2*bw, |
180 |
|
(int)h+2*bh); |
181 |
} |
} |
182 |
} |
} |