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

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

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

revision 1.3 by benja, Sun Feb 23 15:17:36 2003 UTC revision 1.4 by benja, Sun Feb 23 16:50:27 2003 UTC
# Line 74  public class Cursor { Line 74  public class Cursor {
74          }          }
75      }      }
76    
77        public SortedSet getNegwardConnections() {
78            try {
79                SortedSet nodes = new TreeSet(order);
80                StmtIterator i = focus.getModel().listStatements();
81                for(; i.hasNext();) {
82                    Statement stmt = i.next();
83                    if(stmt.getObject().equals(focus))
84                        nodes.add(stmt.getSubject());                  
85                }
86                i.close();
87    
88                return nodes;
89            } catch(RDFException e) {
90                throw new Error("RDFException: "+e);
91            }
92        }
93    
94      /** Rotate the view up or down.      /** Rotate the view up or down.
95       *  This moves the rotation of the cursor one step up or down. XXX       *  This moves the rotation of the cursor one step up or down. XXX
96       */       */
# Line 91  public class Cursor { Line 108  public class Cursor {
108              rotation = (RDFNode)i.next();              rotation = (RDFNode)i.next();
109          }          }
110      }      }
111    
112        /** Move left/right. XXX
113         */
114        public void move(int dir) {
115            if(dir < 0) {
116                rotation = focus;
117                focus = (Resource)getNegwardConnections().first();
118            } else {
119                focus = (Resource)rotation;
120                try {
121                    rotation = (RDFNode)getPoswardConnections().first();
122                } catch(NoSuchElementException _) {
123                    rotation = null;
124                }
125            }
126        }
127  }  }

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