/[fenfire]/fenfire/org/fenfire/view/SpatialPlane.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/SpatialPlane.java

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

revision 1.4 by mudyc, Sat Apr 5 20:26:35 2003 UTC revision 1.5 by mudyc, Tue Apr 8 14:56:52 2003 UTC
# Line 50  public static final String rcsid = "$Id$ Line 50  public static final String rcsid = "$Id$
50    
51    
52      public void renderAWT(VobScene vs, int into, int geom,      public void renderAWT(VobScene vs, int into, int geom,
53                            RDFNode node, Space space,                            RDFNode node, NodeView nodeview,
54                            NodePlacementHook hook)                            Model model, NodePlacementHook hook)
55      { try {      { try {
         Model mod = space.getModel();  
56          RDFNode current = node;          RDFNode current = node;
57          RDFNode container = current;          RDFNode container = current;
58    
59          if (ShortRDF.isNodeType(mod, current, cType)) {          if (ShortRDF.isNodeType(model, current, cType)) {
60              container = ShortRDF.getSubj(mod, current, cont);              container = ShortRDF.getSubj(model, current, cont);
61          }          }
62    
63    
# Line 79  public static final String rcsid = "$Id$ Line 78  public static final String rcsid = "$Id$
78                    
79                    
80          Selector slctr = new SelectorImpl((Resource)container, cont, (RDFNode) null);          Selector slctr = new SelectorImpl((Resource)container, cont, (RDFNode) null);
81          StmtIterator iter = mod.listStatements(slctr);          StmtIterator iter = model.listStatements(slctr);
82          Statement stmt = null;          Statement stmt = null;
83          while (iter.hasNext()) {          while (iter.hasNext()) {
84              RDFNode n = (RDFNode)((Statement)iter.next()).getObject();              RDFNode n = (RDFNode)((Statement)iter.next()).getObject();
85    
             Enfilade1D enf = space.getEnfilade(n);  
             if (enf == null) continue;  
   
             java.util.List enfList = enf.getList();  
             Span1D span = (Span1D) enfList.get(0);  
   
             int[] coords = new int[2];  
   
86              // get coords              // get coords
87              coords[0] = ShortRDF.getInt(mod, n, SPATIAL.coordX);              int[] coords = new int[2];
88              coords[1] = ShortRDF.getInt(mod, n, SPATIAL.coordY);              coords[0] = ShortRDF.getInt(model, n, SPATIAL.coordX);
89                coords[1] = ShortRDF.getInt(model, n, SPATIAL.coordY);
90    
91              // get size XXX              // get size XXX
   
             Pair matchKey = new Pair(container, n);  
   
             // XXX  
             bs[0] = 30; bs[1] = 30;  
92                            
93              //pa("x: "+         (pt[0] + (pan[0] + coords[0]) * zoom) +              nodeview.getSize(n, bs, zoom);
94              //   ", y: "+  (pt[1] + (pan[1] + coords[1]) * zoom));              Pair matchKey = new Pair(container, n);
95                int box = vs.orthoCS(0, matchKey, 50,
96              int box;                                   pt[0] + (pan[0] + coords[0]) * zoom,
97              box = vs.orthoBoxCS(0, matchKey, 100,                                   pt[1] + (pan[1] + coords[1]) * zoom,
98                                  pt[0] + (pan[0] + coords[0]) * zoom,                                   bs[0], bs[1]);
99                                  pt[1] + (pan[1] + coords[1]) * zoom,              nodeview.place(n, vs, box);
                                 1, 1, bs[0], bs[1]);  
   
   
             vs.put(new org.nongnu.libvob.vobs.RectBgVob(java.awt.Color.red), box);  
   
             if (span instanceof TextSpan) {  
                 String s = enf.toString();  
                   
   
                 // nothing  
                 //pa("Text!, ooh..");  
             }  // PageSpan!!!  
             else {  
                 pa("pagespan!, ooh..");  
             }  
   
100              hook.placed(n, vs, box);              hook.placed(n, vs, box);
101                //vs.put(new org.nongnu.libvob.vobs.RectBgVob(java.awt.Color.red), box);
             //if (drawFrame)  
             //  vs.map.put(frame, box);  
               
102          }          }
103    
104              /*              /*

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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