/[gzz]/gzz/lava/gzz/loom/SimpleView.java
ViewVC logotype

Diff of /gzz/lava/gzz/loom/SimpleView.java

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

revision 1.3 by Vegai, Sat Feb 22 12:27:56 2003 UTC revision 1.4 by Vegai, Sat Feb 22 12:54:07 2003 UTC
# Line 26  SimpleView.java Line 26  SimpleView.java
26   */   */
27  package gzz.loom;  package gzz.loom;
28  import gzz.vob.*;  import gzz.vob.*;
29    import gzz.vob.vobs.*;
30  import com.hp.hpl.mesa.rdf.jena.model.*;  import com.hp.hpl.mesa.rdf.jena.model.*;
31    
32  /** A very simple view of an RDF graph.  /** A very simple view of an RDF graph.
# Line 40  import com.hp.hpl.mesa.rdf.jena.model.*; Line 41  import com.hp.hpl.mesa.rdf.jena.model.*;
41   */   */
42  public class SimpleView implements View {  public class SimpleView implements View {
43    
44        final RectBgVob bg = new RectBgVob();
45    
46      public void render(VobScene sc, int into, Resource focus,      public void render(VobScene sc, int into, Resource focus,
47                         RDFNode rotation) {                         RDFNode rotation) {
48          try {          try {
49              int cs = sc.boxCS(into, focus, 0, 0, 50, 20);              int cs = sc.boxCS(into, focus, 0, 0, 50, 20);
50              int csr = sc.boxCS(into, rotation, 100, 0, 50, 20);              sc.map.put(bg, cs);
51                cs = sc.boxCS(into, rotation, 100, 0, 50, 20);
52                sc.map.put(bg, cs);
53              StmtIterator i=focus.listProperties();              StmtIterator i=focus.listProperties();
54              int y = 50;              int y = 50;
55              for(; i.hasNext();) {              for(; i.hasNext();) {
56                  Statement s = i.next();                  Statement s = i.next();
57                  if(s.getObject().equals(rotation)) continue;                  if(s.getObject().equals(rotation)) continue;
58                  sc.boxCS(into, s.getObject(), 100, y, 50, 20);                  cs = sc.boxCS(into, s.getObject(), 100, y, 50, 20);
59                    sc.map.put(bg, cs);
60                  y += 50;                  y += 50;
61              }              }
62              i.close();              i.close();

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

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