gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] loom ./TODO org/fenfire/loom/ViewSettings.java ...


From: Asko Soukka
Subject: [Gzz-commits] loom ./TODO org/fenfire/loom/ViewSettings.java ...
Date: Sun, 06 Apr 2003 19:43:48 -0400

CVSROOT:        /cvsroot/loom
Module name:    loom
Changes by:     Asko Soukka <address@hidden>    03/04/06 19:43:48

Modified files:
        .              : TODO 
        org/fenfire/loom: ViewSettings.java WheelView.java 
Added files:
        org/fenfire/loom: SundewWheelView.java 

Log message:
        abstracting WheelView, quick Sundew implementation -> almost an 
illusion of virtual space :)

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/loom/loom/TODO.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/loom/loom/org/fenfire/loom/SundewWheelView.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/loom/loom/org/fenfire/loom/ViewSettings.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/loom/loom/org/fenfire/loom/WheelView.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: loom/TODO
diff -u loom/TODO:1.3 loom/TODO:1.4
--- loom/TODO:1.3       Wed Apr  2 08:10:15 2003
+++ loom/TODO   Sun Apr  6 19:43:48 2003
@@ -30,7 +30,6 @@
       (too high or too small), it should fix itself
       when move() is called.
 
-
 later, or now if somebody wants to:
     - draw UML diagrams similar to Gzz "Core APIs"
 
@@ -43,6 +42,13 @@
     + WebStart deployment of Loom?
 
 humppake:
-    - enhance wheel (or create additional Wheel Views):
-      + more like those in Gzz 0.6, e.g. with more than the 
-        immediate neighbours showing
+    - comment code better in WheelViews
+    - update tests for WheelViews
+      - try to understand, how the test space is created :)
+    - correct CS-activations for mouse in WheelViews
+    - add options and stubs for WheelViews
+      - rotating stub vob
+    - how to handle scaling of vobs in WheelViews?
+      - in more general -> Loom needs its VanishingView and
+        general interface for it
+    - implement the Wheel as oval, could be better than circle in 4:3 
screens...
\ No newline at end of file
Index: loom/org/fenfire/loom/ViewSettings.java
diff -u loom/org/fenfire/loom/ViewSettings.java:1.1 
loom/org/fenfire/loom/ViewSettings.java:1.2
--- loom/org/fenfire/loom/ViewSettings.java:1.1 Mon Mar 31 17:41:23 2003
+++ loom/org/fenfire/loom/ViewSettings.java     Sun Apr  6 19:43:48 2003
@@ -37,7 +37,8 @@
 
     public ViewSettings(NodeView nodeView) {
        views = new View[] { new WheelView(nodeView), 
-                            new SimpleView(nodeView) };
+                            new SimpleView(nodeView),
+                            new SundewWheelView(nodeView)};
     }
 
     public View getView() {
Index: loom/org/fenfire/loom/WheelView.java
diff -u loom/org/fenfire/loom/WheelView.java:1.5 
loom/org/fenfire/loom/WheelView.java:1.6
--- loom/org/fenfire/loom/WheelView.java:1.5    Fri Apr  4 09:03:55 2003
+++ loom/org/fenfire/loom/WheelView.java        Sun Apr  6 19:43:48 2003
@@ -106,43 +106,50 @@
            else
                sc.map.put(conn, cs2, focusCs);
 
-           if (depth > 1) {
-               RDFNode newFocus = (RDFNode)current.first;
-               if (newFocus != null && newFocus instanceof Resource) {
-
-                   Vector removal = new Vector();
-                   Pair focusPair = new Pair(focus, (Property)current.second);
-                   removal.add(focusPair);
-
-                   /** This shows as much nodes as possible. Shows the both 
directions
-                    * also in branches. Removes the focused node+prop pairs 
from branch.
-                    * Problem is that moving don't work properly. Nodes change 
from the
-                    * one side to another and it seems to be confusing.
-                    */
-                   Collection subNodes = getNodes(c, (Resource)newFocus, 0, 
removal);
-
-                   /** This won't remove any nodes. */
-                   //Collection subNodes = getNodes(c, (Resource)newFocus, 0);
-
-                   /** This don't show the links of opposite direction at all 
in branches.
-                    * This is the one, which would really work, if we would 
have rotable
-                    * stubs to shown the hidden connections
-                    */
-                   //Collection subNodes = getNodes(c, (Resource)newFocus, 
dir);
-
-                   double subRota = getRotationAngle(c, (Resource)newFocus, 
subNodes,
-                                                     rota, depth-1);
-                   renderSomewardConnections(sc, into, c, (Resource)newFocus, 
subNodes,
-                                             subNodes.size()/2, dir, cura, 
subRota,
-                                             r+gapx+sizex, cs2, depth-1, midx, 
midy);
-               }
-           }
-
+           if (depth > 1)
+               renderDepth(sc, into, c, focus, current, nodes, dir,
+                           cura, rota, r, cs2, depth, midx, midy);
+           
            cura+=rota;
            before--;
        }
     }
 
+    protected void renderDepth(VobScene sc, int into, Cursor c, Resource focus,
+                           Pair current, Collection nodes, int dir, double 
cura,
+                           double rota, float r, int focusCs, int depth, int 
midx,
+                           int midy) {
+       RDFNode newFocus = (RDFNode)current.first;
+       if (newFocus != null && newFocus instanceof Resource) {
+           
+           Vector removal = new Vector();
+           Pair focusPair = new Pair(focus, (Property)current.second);
+           removal.add(focusPair);
+
+           /** This shows as much nodes as possible. Shows the both directions
+            * also in branches. Removes the focused node+prop pairs from 
branch.
+            * Problem is that moving don't work properly. Nodes change from the
+            * one side to another and it seems to be confusing.
+            */
+           Collection subNodes = getNodes(c, (Resource)newFocus, 0, removal);
+           
+           /** This won't remove any nodes. */
+           //Collection subNodes = getNodes(c, (Resource)newFocus, 0);
+           
+           /** This don't show the links of opposite direction at all in 
branches.
+            * This is the one, which would really work, if we would have 
rotable
+            * stubs to shown the hidden connections
+            */
+           //Collection subNodes = getNodes(c, (Resource)newFocus, dir);
+           
+           double subRota = getRotationAngle(c, (Resource)newFocus, subNodes,
+                                             rota, depth-1);
+           renderSomewardConnections(sc, into, c, (Resource)newFocus, subNodes,
+                                     subNodes.size()/2, dir, cura, subRota,
+                                     r+gapx+sizex, focusCs, depth-1, midx, 
midy);
+       }
+    }
+
     public void render(VobScene sc, int into, Cursor c) {
        if (dbg) 
p("*******************************************************************");       
   
        int midx = sc.size.width/2, midy = sc.size.height/2;
@@ -152,9 +159,6 @@
        sc.coords.activate(cs);
        nodeView.render(sc, cs, spec);
 
-       /** Radius = gapx * sizex */
-       int r = gapx + sizex;
-
        Collection posNodes = getNodes(c, 1);
        Collection negNodes = getNodes(c, -1);
        double posRota = getRotationAngle(c, posNodes, Math.PI, depth);
@@ -169,14 +173,14 @@
        /** Poswards connections */
        renderSomewardConnections(sc, into, c, c.focus, posNodes,
                                  c.getRotationIndex(1), 1, 0,
-                                 rota, r, cs, depth, midx, midy);
+                                 rota, radius, cs, depth, midx, midy);
 
        if (dbg) p("Render, negNodes: "+negNodes.size()+
                   ", negRota: "+negRota+", rota: "+rota);          
        /** Negward connections */
        renderSomewardConnections(sc, into, c, c.focus, negNodes,
                                  c.getRotationIndex(-1), -1, Math.PI,
-                                 rota, r, cs, depth, midx, midy);
+                                 rota, radius, cs, depth, midx, midy);
     }
 
     protected double getRotationAngle(Cursor c, Resource node, Collection 
nodes,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]