/[fenfire]/fenfire/org/fenfire/modules/pp/RSTActionsImpl.java
ViewVC logotype

Diff of /fenfire/org/fenfire/modules/pp/RSTActionsImpl.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mudyc, Mon May 5 01:38:49 2003 UTC revision 1.3 by mudyc, Mon May 5 02:37:38 2003 UTC
# Line 17  import org.fenfire.impl.*; Line 17  import org.fenfire.impl.*;
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;
# Line 222  public static final String rcsid = "$Id$ Line 222  public static final String rcsid = "$Id$
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);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26