17 |
*/ |
*/ |
18 |
public class RSTActionsImpl extends UnicastRemoteObject implements RSTActions { |
public class RSTActionsImpl extends UnicastRemoteObject implements RSTActions { |
19 |
public static final String rcsid = "$Id$"; |
public static final String rcsid = "$Id$"; |
20 |
public static final boolean dbg = true; |
public static final boolean dbg = false; |
21 |
protected static void p(String s) { System.out.println("RSTActionsImpl: "+s); } |
protected static void p(String s) { System.out.println("RSTActionsImpl: "+s); } |
22 |
|
|
23 |
private Fen fen = null; |
private Fen fen = null; |
222 |
if (dbg) p("senten, "+iy); |
if (dbg) p("senten, "+iy); |
223 |
Object node = fen.graph.find1_11X(senten, RST.nextNode); |
Object node = fen.graph.find1_11X(senten, RST.nextNode); |
224 |
int x = paragX; |
int x = paragX; |
225 |
for (int ix=0; node != null; ix++) { |
while (node != null) { |
226 |
if (dbg) p("node, "+ix); |
if (dbg) p("node"); |
|
|
|
|
Placeable p = (Placeable)nodef.f(fen.constgraph, node); |
|
|
|
|
|
x += p.getWidth(); |
|
227 |
int y = paragY + iy*30; |
int y = paragY + iy*30; |
228 |
|
|
229 |
// set coords |
// set coords |
230 |
fen.graph.set1_11X(node, SPATIAL.coordX, Nodes.getStringLiteral(""+x) ); |
fen.graph.set1_11X(node, SPATIAL.coordX, Nodes.getStringLiteral(""+x) ); |
231 |
fen.graph.set1_11X(node, SPATIAL.coordY, Nodes.getStringLiteral(""+y) ); |
fen.graph.set1_11X(node, SPATIAL.coordY, Nodes.getStringLiteral(""+y) ); |
232 |
|
|
233 |
|
Placeable p = (Placeable)nodef.f(fen.constgraph, node); |
234 |
|
p("x before: "+x); |
235 |
|
x += p.getWidth(); |
236 |
|
p("x: "+x+", w: "+p.getWidth()+" x+w: "+(x+p.getWidth())); |
237 |
|
|
238 |
node = fen.graph.find1_11X(node, RST.nextNode); |
node = fen.graph.find1_11X(node, RST.nextNode); |
239 |
} |
} |
240 |
senten = fen.graph.find1_11X(senten, RST.nextSentence); |
senten = fen.graph.find1_11X(senten, RST.nextSentence); |