gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] fenfire/org/fenfire/modules/pp PPCanvasNode.java


From: Matti Katila
Subject: [Gzz-commits] fenfire/org/fenfire/modules/pp PPCanvasNode.java
Date: Thu, 27 Mar 2003 05:42:37 -0500

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Changes by:     Matti Katila <address@hidden>   03/03/27 05:42:37

Modified files:
        org/fenfire/modules/pp: PPCanvasNode.java 

Log message:
        compiles without singlepaper

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/modules/pp/PPCanvasNode.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: fenfire/org/fenfire/modules/pp/PPCanvasNode.java
diff -u fenfire/org/fenfire/modules/pp/PPCanvasNode.java:1.2 
fenfire/org/fenfire/modules/pp/PPCanvasNode.java:1.3
--- fenfire/org/fenfire/modules/pp/PPCanvasNode.java:1.2        Wed Mar 26 
09:00:24 2003
+++ fenfire/org/fenfire/modules/pp/PPCanvasNode.java    Thu Mar 27 05:42:37 2003
@@ -1,38 +1,53 @@
 //(c): Matti J. Katila
 
 package org.fenfire.modules.pp;
+import org.fenfire.*;
+import org.fenfire.impl.*;
+//import org.fenfire.vocab.*;
 import org.fenfire.vocab.*;
 import org.fenfire.util.*;
 import org.fenfire.view.*;
 import org.fenfire.view.buoy.*;
 import org.nongnu.libvob.*;
 import org.nongnu.libvob.buoy.*;
+
+import org.nongnu.storm.*;
+import org.nongnu.alph.*;
+import org.nongnu.alph.impl.*;
+
 import com.hp.hpl.mesa.rdf.jena.model.*;
 import com.hp.hpl.mesa.rdf.jena.common.*;
 import com.hp.hpl.mesa.rdf.jena.vocabulary.*;
 
 public class PPCanvasNode implements NodeBuoyViewNodeType {
-private static final String rcsid = "$Id: PPCanvasNode.java,v 1.2 2003/03/26 
14:00:24 mudyc Exp $";  
+private static final String rcsid = "$Id: PPCanvasNode.java,v 1.3 2003/03/27 
10:42:37 mudyc Exp $";  
     public static boolean dbg = false;
     private static void pa(String s) { System.out.println("PPCanvasNode:"+s); }
 
-    private Model model;
+    private Space space;
     private GraphicsAPI.Window win;
-    public PPCanvasNode(Model m, GraphicsAPI.Window w) {
-       this.model = m;
+    public PPCanvasNode(Space s, GraphicsAPI.Window w) {
+       this.space = s;
        this.win = w;
     }
     
+    /** The zoom to be used for the buoys.
+     */
+    public float buoyZoom = 1;
+
+    /** The zoom to be used for the link creation buoys.
+     */
+    public float linkbuoyZoom = .5f;
 
     /** True if this view "owns" a certain node.
      */
     public boolean ownsNode(RDFNode node) 
     {
        // check if node is a note
-       if (ShortRDF.isNodeType(model, node, PP.noteType)) return true;
+       if (ShortRDF.isNodeType(space.getModel(), node, PP.noteType)) return 
true;
        
        // or if node is a paper
-       if (ShortRDF.isNodeType(model, node, PP.paperType)) return true;
+       if (ShortRDF.isNodeType(space.getModel(), node, PP.paperType)) return 
true;
        
        // otherwise
        return false;
@@ -49,8 +64,9 @@
            wh[1] /= 6;
            return null;
        }
-
-       // XXX
+       
+       wh[0] = 250;
+       wh[1] = 250;
        return null;
     }
 
@@ -68,21 +84,19 @@
 
        int[] pan = getCoords(node);
 
-       /*      
-       SimpleVStreamTexter sct = (SimpleVStreamTexter)space.getCellTexter();
-       Enfilade1DImpl enf = (Enfilade1DImpl)sct.getEnfilade(c, null);
+       SimpleVStreamTexter sct = (SimpleVStreamTexter)space.getNodeTexter();
+       Enfilade1DImpl enf = (Enfilade1DImpl)sct.getEnfilade(node, null);
        java.util.List enfList= enf.getList();
        Span1D span = (Span1D) enfList.get(0);
-       CellView cv;
-       if (span instanceof TextSpan)
-           cv = new TextCellContentView();
-       else
-           cv = new PageSpanCellView();
+
         float [] bs = new float[3];
-       cv.getSize(c, ((ViewContext)new AbstractViewContext()), bs);
 
-       pan[0] += bs[0]/2;
-       pan[1] += bs[1]/2;
+       //cv.getSize(c, ((ViewContext)new AbstractViewContext()), bs);
+
+       //pan[0] += bs[0]/2;
+       //pan[1] += bs[1]/2;
+       pan[0] += 200/2;
+       pan[1] += 200/2;
 
 
        final int c2fCS = 
@@ -92,8 +106,7 @@
        vs.matcher.add(into, c2fCS, "C2F");
        vs.matcher.add(into, c2fCSInv, "C2FINV");
 
-       SinglePaper.i(space, d,win,c).render(vs, into, c2fCS, c2fCSInv, null);
-       */
+       //SinglePaper.i(space, d,win,c).render(vs, into, c2fCS, c2fCSInv, null);
        return into;
     }
 
@@ -108,8 +121,8 @@
     private int[] getCoords(RDFNode node) {
        int [] ints = new int[2];
        
-       ints[0] = ShortRDF.getInt(model, node, SPATIAL.coordX);
-       ints[1] = ShortRDF.getInt(model, node, SPATIAL.coordY);
+       ints[0] = ShortRDF.getInt(space.getModel(), node, SPATIAL.coordX);
+       ints[1] = ShortRDF.getInt(space.getModel(), node, SPATIAL.coordY);
        return ints;
     }
 




reply via email to

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