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

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

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

revision 1.3 by benja, Sun Feb 23 14:15:46 2003 UTC revision 1.4 by benja, Sun Feb 23 14:45:14 2003 UTC
# Line 53  public class Loom { Line 53  public class Loom {
53      public static void main(String[] args) throws RDFException, IOException {      public static void main(String[] args) throws RDFException, IOException {
54          final Model model = load(args[0]);          final Model model = load(args[0]);
55          final Statement stmt = model.listStatements().next();          final Statement stmt = model.listStatements().next();
         final Cursor cursor = new Cursor(stmt.getSubject(), stmt.getObject());  
56          final GraphicsAPI api = GraphicsAPI.getInstance();          final GraphicsAPI api = GraphicsAPI.getInstance();
57    
58          final Comparator cmp = new Comparator() {          final Comparator order = new Comparator() {
59                  public int compare(Object o1, Object o2) {                  public int compare(Object o1, Object o2) {
60                      return o1.hashCode() - o2.hashCode();                      return o1.hashCode() - o2.hashCode();
61                  }                  }
62              };              };
63            final Cursor cursor =
64                new Cursor(order, stmt.getSubject(), stmt.getObject());
65    
66          final Vob bg = new RectBgVob();          final Vob bg = new RectBgVob();
67          final TextStyle style = api.getTextStyle("Serif", 0, 12);          final TextStyle style = api.getTextStyle("Serif", 0, 12);
68          final NodeView nodeView = new NodeView() {          final NodeView nodeView = new NodeView() {
# Line 76  public class Loom { Line 78  public class Loom {
78                  }                  }
79                  public VobScene generate() {                  public VobScene generate() {
80                      VobScene sc = this.screen.window.createVobScene();                      VobScene sc = this.screen.window.createVobScene();
81                      SimpleView sv = new SimpleView(cmp, nodeView);                      SimpleView sv = new SimpleView(nodeView);
82                      sc.map.put(new SolidBgVob(java.awt.Color.white), 0);                      sc.map.put(new SolidBgVob(java.awt.Color.white), 0);
83                      sv.render(sc, 0, cursor);                      sv.render(sc, 0, cursor);
84                      return sc;                      return sc;

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