gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./Gzz.py gfx/librenderables/Makefile-javaon...


From: Benja Fallenstein
Subject: [Gzz-commits] gzz ./Gzz.py gfx/librenderables/Makefile-javaon...
Date: Thu, 05 Dec 2002 20:03:53 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      02/12/05 20:03:51

Modified files:
        .              : Gzz.py 
        gfx/librenderables: Makefile-javaonly 
        gzz/client     : Fallback.java 
        gzz/modules/pp : ImageCell.java PPView2.java 
        gzz/view       : AbstractViewContext.java BoxCellView.java 
                         CellMagnifier.java CellView.java 
                         CoordinatePlaneView.java FullScreenView.java 
                         ImageCellContentView.java LastOpDecorator.java 
                         LinebrokenCellContentView.java 
                         LollipopCellView.java MarkDecorator.java 
                         MultitypeCellContentView.java RowColView.java 
                         TextCellContentView.java ViewContext.java 
                         VobVanishingClient.java ZZViewContext.java 
        test/gzz/view  : MockViewContext.java 
Added files:
        gzz/view       : CellViewPlugin.java 
Removed files:
        gzz/view       : CellContentView.java CellInBox.java 
                         CellInBoxPlugin.java 

Log message:
        Broken commit: CellInBox -> CellView. Need to fix on other machine...

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Gzz.py.diff?tr1=1.49&tr2=1.50&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/librenderables/Makefile-javaonly.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/client/Fallback.java.diff?tr1=1.51&tr2=1.52&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/ImageCell.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellViewPlugin.java?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/AbstractViewContext.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/BoxCellView.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellMagnifier.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellView.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CoordinatePlaneView.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/FullScreenView.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/ImageCellContentView.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/LastOpDecorator.java.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/LinebrokenCellContentView.java.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/LollipopCellView.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/MarkDecorator.java.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/MultitypeCellContentView.java.diff?tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/RowColView.java.diff?tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/TextCellContentView.java.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/ViewContext.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/VobVanishingClient.java.diff?tr1=1.23&tr2=1.24&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/ZZViewContext.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/view/MockViewContext.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gzz/Gzz.py
diff -u gzz/Gzz.py:1.49 gzz/Gzz.py:1.50
--- gzz/Gzz.py:1.49     Mon Nov 25 11:03:38 2002
+++ gzz/Gzz.py  Thu Dec  5 20:03:50 2002
@@ -42,10 +42,6 @@
                       gzz.view.RowColView(0), gzz.view.RowColView(1),
                       ]
         self.viewSpecificBinders = java.util.HashMap()
-        if 'lollipop' not in self.flags:
-            self.cellView = gzz.view.BoxCellView()
-        else:
-            self.cellView = gzz.view.LollipopCellView()
         if 'multiline' not in self.flags:
             self.cellContentView = gzz.view.TextCellContentView(self.style)
         else:
@@ -67,10 +63,15 @@
                 self.cellContentView, gzz.view.pagespanview.ContentView(),
                 gzz.view.ImageCellContentView())
             
+        if 'lollipop' not in self.flags:
+            self.cellView = gzz.view.BoxCellView(self.cellContentView)
+        else:
+            self.cellView = gzz.view.LollipopCellView(self.cellContentView)
+
         gzz.client.Fallback(self.space.getHomeCell(), self.linkSpace, 
                             self.binder, self.dimensions, self.views, 
-                            self.viewSpecificBinders, self.cellView, 
-                            self.cellContentView, self.filers)
+                            self.viewSpecificBinders, self.cellViews, 
+                            self.filers)
         gzz.client.AbstractUpdateManager.chg()
 
 
Index: gzz/gfx/librenderables/Makefile-javaonly
diff -u gzz/gfx/librenderables/Makefile-javaonly:1.4 
gzz/gfx/librenderables/Makefile-javaonly:1.5
--- gzz/gfx/librenderables/Makefile-javaonly:1.4        Fri Nov 22 19:42:26 2002
+++ gzz/gfx/librenderables/Makefile-javaonly    Thu Dec  5 20:03:50 2002
@@ -18,13 +18,18 @@
 ifeq (,$(JYTHONPATH))
  
JYTHONPATH=$(GZZ_DEPENDS)/jythonlib.jar:$(GZZ_DEPENDS)/pythonlib.jar:$(GZZ_DEPENDS)/yaml.jar:$(GZZ_DEPENDS)/docutils.jar
 endif
+
 ifeq (,$(JYTHON))
 # python.verbose can be: "error", "warning", "message", "comment", "debug"
  JYTHON=$(JAVA) $(JVMFLAGS) -Dpython.path=$(JYTHONPATH) 
-Dpython.verbose=message $(EDITOR_OPTION) org.python.util.jython
 endif
 
+ifeq (,$(PYTHON))
+ PYTHON=$(JYTHON)
+endif
+
 ../../gzz/gfx/gl/GLRen.java RealRenderables.hxx RealRenderables-jni.hxx: 
renderables.py
        echo "Classpath:"
        echo $$CLASSPATH
-       $(JYTHON) renderables.py
+       $(PYTHON) renderables.py
 
Index: gzz/gzz/client/Fallback.java
diff -u gzz/gzz/client/Fallback.java:1.51 gzz/gzz/client/Fallback.java:1.52
--- gzz/gzz/client/Fallback.java:1.51   Sun Nov 24 15:09:18 2002
+++ gzz/gzz/client/Fallback.java        Thu Dec  5 20:03:50 2002
@@ -74,7 +74,7 @@
  * It implements a subset of the 0.6.0 bindings.
  */
 public class Fallback {
-public static final String rcsid = "$Id: Fallback.java,v 1.51 2002/11/24 
20:09:18 benja Exp $";
+public static final String rcsid = "$Id: Fallback.java,v 1.52 2002/12/06 
01:03:50 benja Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -115,6 +115,7 @@
 
     public Space space;
     public View[] viewList;
+    public CellView[] cellViewList;
     public FallbackBinder binder;
     
     /** FallbackBinder objects only used when a given view is active.
@@ -122,7 +123,6 @@
      */
     Map viewSpecificBinders;
     
-    CellInBox cellView, cellContentView;
 
     /** A name and a dimension object.
      */
@@ -146,6 +146,7 @@
        public Dim[] dims = new Dim[dimsIndices.length];
 
         public int viewIndex = 0;
+       public int cellViewIndex = 0;
 
        Color col, bg;
 
@@ -195,11 +196,8 @@
        public boolean isMarked(Cell c) {
            return DefaultBinder.markedCells.contains(c);
        }
-        public CellInBox getCellView() {
-            return cellView;
-        }
-        public CellInBox getCellContentView() {
-            return cellContentView;
+        public CellView getCellView() {
+            return cellViewList[cellViewIndex];
         }
         public Cell getWindow() {
             throw new UnsupportedOperationException(
@@ -346,8 +344,8 @@
 
     public Fallback(Cell start, Space linkSpace, FallbackBinder binder,
                    FallbackDim[] dimList,
-                    View[] viewList, Map viewSpecificBinders, CellInBox 
cellView,
-                    CellInBox cellContentView, Filer.Group filers) {
+                    View[] viewList, Map viewSpecificBinders, 
+                   CellView[] cellViewList, Filer.Group filers) {
        this.binder = binder;
        this.dimList = dimList;
         this.viewList = viewList;
@@ -355,8 +353,7 @@
        this.filers = filers;
        this.space = start.space;
         this.linkSpace = linkSpace;
-        this.cellView = cellView;
-        this.cellContentView = cellContentView;
+        this.cellViewList = cellViewList;
        
        binder.setFallback(this);
         
Index: gzz/gzz/modules/pp/ImageCell.java
diff -u gzz/gzz/modules/pp/ImageCell.java:1.4 
gzz/gzz/modules/pp/ImageCell.java:1.5
--- gzz/gzz/modules/pp/ImageCell.java:1.4       Wed Nov 27 11:35:41 2002
+++ gzz/gzz/modules/pp/ImageCell.java   Thu Dec  5 20:03:51 2002
@@ -30,7 +30,7 @@
 import java.util.*;
 import gzz.gfx.gl.*;
 
-public class ImageCell extends CellInBox {
+public class ImageCell extends CellView {
     static Map ims = new HashMap();
 
     static class Im {
@@ -71,9 +71,9 @@
        return im;
     }
 
-    CellInBox def;
+    CellView def;
 
-    public ImageCell(CellInBox def) {
+    public ImageCell(CellView def) {
        this.def = def;
     }
 
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.22 
gzz/gzz/modules/pp/PPView2.java:1.23
--- gzz/gzz/modules/pp/PPView2.java:1.22        Wed Dec  4 16:20:50 2002
+++ gzz/gzz/modules/pp/PPView2.java     Thu Dec  5 20:03:51 2002
@@ -302,7 +302,7 @@
     }
 
     TextStyle style = GraphicsAPI.getInstance().getTextStyle("Sans", 0, 20);
-    CellInBox cellview = new ImageCell(new TextCellContentView(style));
+    CellView cellview = new ImageCell(new TextCellContentView(style));
 
     // public so can be replaced from jython
     public Vob filletState = GLCache.getCallList(
@@ -330,9 +330,9 @@
            main_vc.setCellView(cellview);
        else
            main_vc.setCellView(
-               new CellInBoxPlugin(cellview,
-                                   new Cell1DBuoyHook(leftFloater, 
rightFloater,
-                                               d.clone, d.association)));
+               new CellViewPlugin(cellview,
+                                  new Cell1DBuoyHook(leftFloater, rightFloater,
+                                                     d.clone, d.association)));
 
        Dimension size = vs.getSize();
        
Index: gzz/gzz/view/AbstractViewContext.java
diff -u gzz/gzz/view/AbstractViewContext.java:1.4 
gzz/gzz/view/AbstractViewContext.java:1.5
--- gzz/gzz/view/AbstractViewContext.java:1.4   Wed Nov  6 12:41:22 2002
+++ gzz/gzz/view/AbstractViewContext.java       Thu Dec  5 20:03:51 2002
@@ -37,8 +37,7 @@
     Dim[] dims;
     int cursorOffset;
     View view;
-    CellInBox cellView;
-    CellInBox cellContentView;
+    CellView cellView;
 
     public void setAccursed(Cell c) { 
        accursed = c; 
@@ -58,13 +57,8 @@
     public void setView(View view) { this.view = view; }
     public View getView() { return view; }
 
-    public void setCellView(CellInBox cellView) { this.cellView = cellView; }
-    public CellInBox getCellView() { return cellView; }
-
-    public void setCellContentView(CellInBox cellContentView) { 
-       this.cellContentView = cellContentView; 
-    }
-    public CellInBox getCellContentView() { return cellContentView; }
+    public void setCellView(CellView cellView) { this.cellView = cellView; }
+    public CellView getCellView() { return cellView; }
 
     public boolean isMarked(Cell c) { return false; }
     public Cell getWindow() throws UnsupportedOperationException {
Index: gzz/gzz/view/BoxCellView.java
diff -u gzz/gzz/view/BoxCellView.java:1.4 gzz/gzz/view/BoxCellView.java:1.5
--- gzz/gzz/view/BoxCellView.java:1.4   Wed Nov 27 11:35:41 2002
+++ gzz/gzz/view/BoxCellView.java       Thu Dec  5 20:03:51 2002
@@ -33,23 +33,23 @@
 import java.util.*;
 import java.util.List;
 
-/** A factory for making basic cell vobs.
- * This is an enclosing class and a factory at the same time
- * in order to store Dim objects for fast access.
- * <p>
- * New cell vobs are created like
- * <pre>
- *     BoxCellView cvf;
- *     Vob v = cvf.new CellVob(...);.
- * </pre>
+/** A cell view showing a box around a cell.
  */
 
 public class BoxCellView extends CellView {
-public static final String rcsid = "$Id: BoxCellView.java,v 1.4 2002/11/27 
16:35:41 humppake Exp $";
+public static final String rcsid = "$Id: BoxCellView.java,v 1.5 2002/12/06 
01:03:51 benja Exp $";
     public static boolean dbg = false;
     private static void p(String s) { if(dbg) pa(s); }
     private static void pa(String s) { System.err.println(s); }
 
+    /** The cell content view used
+     *  to render the content of cells.
+     */
+    protected CellView ccv;
+    public BoxCellView(CellView ccv) {
+       this.ccv = ccv;
+    }
+
     static Object CONTENT_KEY = new Object();
     static Object BOX_KEY = new Object();
     static Object UNCLIP = new Object();
@@ -72,7 +72,7 @@
 
     public void getSize(Cell c, float scale, ViewContext context,
                        float[] into) {
-       context.getCellContentView().getSize(c, scale, context, into);
+       ccv.getSize(c, scale, context, into);
        into[0] += 10; 
        into[1] += 10;
     }
@@ -84,8 +84,6 @@
        if(d_clone == null)
            throw new NullPointerException("clone dim not set in BoxCellView");
             
-        final CellInBox ccv = context.getCellContentView();
-
        final RectBgVob bg = new RectBgVob();
 
        List cursorColors = context.getCursorColors(c);
Index: gzz/gzz/view/CellMagnifier.java
diff -u gzz/gzz/view/CellMagnifier.java:1.2 gzz/gzz/view/CellMagnifier.java:1.3
--- gzz/gzz/view/CellMagnifier.java:1.2 Mon Dec  2 20:33:19 2002
+++ gzz/gzz/view/CellMagnifier.java     Thu Dec  5 20:03:51 2002
@@ -24,10 +24,10 @@
 import gzz.*;
 import gzz.vob.*;
 
-/** A CellInBox that delegates all calls to another CellInBox,
+/** A CellView that delegates all calls to another CellView,
  *  except that it multiplies the results of getSize() calls
  *  with a constant factor. Used for showing cells larger or smaller
- *  than the normal CellInBox would.
+ *  than the normal CellView would.
  *  <p>
  *  Note that this does <strong>not</strong> work by wrapping
  *  the body in a scaling coordinate set. It only provides different
@@ -38,11 +38,11 @@
  *  With LinebreakingCellView, magnifying the cells may allow
  *  multiple lines of text to be shown.
  */
-public class CellMagnifier extends CellInBox {
-    protected CellInBox sub;
+public class CellMagnifier extends CellView {
+    protected CellView sub;
     protected float factor;
 
-    public CellMagnifier(CellInBox sub, float factor) {
+    public CellMagnifier(CellView sub, float factor) {
        this.sub = sub;
        this.factor = factor;
     }
Index: gzz/gzz/view/CellView.java
diff -u gzz/gzz/view/CellView.java:1.8 gzz/gzz/view/CellView.java:1.9
--- gzz/gzz/view/CellView.java:1.8      Fri Nov  1 20:23:45 2002
+++ gzz/gzz/view/CellView.java  Thu Dec  5 20:03:51 2002
@@ -1,7 +1,7 @@
 /*
-CellView.java
+CellInBox.java
  *    
- *    Copyright (c) 2002, Benja Fallenstein
+ *    Copyright (c) 2002, Tuomas J. Lukka
  *    
  *    You may use and distribute under the terms of either the GNU Lesser
  *    General Public License, either version 2 of the license or,
@@ -18,15 +18,52 @@
  *    
  */
 /*
- * Written by Benja Fallenstein
+ * Written by Tuomas J. Lukka
  */
+
 package gzz.view;
 import gzz.*;
 import gzz.vob.*;
 import gzz.vob.vobs.*;
 
-/** A view showing a single cell.
+/** A view that shows a cell in a box.
+ * Whether it draws a box or not is not defined by this interface.
+ * A common pattern is that a CellView drawing a box calls
+ * a sub-cellview to draw the actual content.
+ * <p>
+ * When subclassing, you must override one of the getSize() methods;
+ * the others will work. If you don't, you'll get an infinite loop:
+ * the default implementations call each other.
  */
-public abstract class CellView extends CellInBox {
-public static final String rcsid = "$Id: CellView.java,v 1.8 2002/11/02 
01:23:45 benja Exp $";
+public abstract class CellView {
+public static final String rcsid = "$Id: CellView.java,v 1.9 2002/12/06 
01:03:51 benja Exp $";
+    /** Place the contents of one cell into the given coord system.
+     * The coordsys given shall be a mapping from the rectangle
+     * (0,w)x(0,h) onto the screen.
+     * @param box A coordinate system, into whose "unit square" the cell will 
be placed.
+     *                         Note that some coordinate systems (box, 
orthoBox) set their "unit
+     *                         square" not to be 0..1 x 0..1.
+     */
+    public abstract void place(Cell c, VobScene vs, int box,
+                          ViewContext context);
+
+    /** Get the default size of the cell.
+     * @param c The cell to get size for, or null for a default size.
+     */
+    public void getSize(Cell c, ViewContext context, float[] out) {
+       getSize(c, 1, context, out);
+    }
+
+    /** Get the default size of the cell at a given scale.
+     * This method exists for the benefit of AWT, where fonts cannot
+     * be scaled accurately.
+     * <p>
+     * Note that the returned width and height are in Box scale:
+     * they are not multiplied by the scale parameter.
+     * @param c The cell to get size for, or null for a default size.
+     */
+    public void getSize(Cell c, float scale, ViewContext context,
+                       float[] out) {
+       getSize(c, context, out);
+    }
 }
Index: gzz/gzz/view/CoordinatePlaneView.java
diff -u gzz/gzz/view/CoordinatePlaneView.java:1.7 
gzz/gzz/view/CoordinatePlaneView.java:1.8
--- gzz/gzz/view/CoordinatePlaneView.java:1.7   Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/CoordinatePlaneView.java       Thu Dec  5 20:03:51 2002
@@ -35,7 +35,7 @@
  */
 
 public class CoordinatePlaneView implements View {
-public static final String rcsid = "$Id: CoordinatePlaneView.java,v 1.7 
2002/11/23 13:44:20 benja Exp $";
+public static final String rcsid = "$Id: CoordinatePlaneView.java,v 1.8 
2002/12/06 01:03:51 benja Exp $";
     public static boolean dbg = true;
     private static void pa(String s) { System.err.println(s); }
 
@@ -58,7 +58,7 @@
        Cell head = item;
        float[] bs = new float[2];
        cursorBox = -1;
-       CellInBox cv = context.getCellView();
+       CellView cv = context.getCellView();
        while(item != null) { // for every item:
            Cell firstCoord = item.s(d_coords, 1);
            if(dbg) pa("CPV: "+item+" "+firstCoord);
Index: gzz/gzz/view/FullScreenView.java
diff -u gzz/gzz/view/FullScreenView.java:1.6 
gzz/gzz/view/FullScreenView.java:1.7
--- gzz/gzz/view/FullScreenView.java:1.6        Fri Nov  1 20:23:45 2002
+++ gzz/gzz/view/FullScreenView.java    Thu Dec  5 20:03:51 2002
@@ -31,7 +31,7 @@
     public void render(VobScene vs, int into, ViewContext context) {
         java.awt.Dimension size = vs.getSize();
        int box = vs.boxCS(0, "FSBox", size.width, size.height);
-        context.getCellContentView().place(
+        context.getCellView().place(
             context.getAccursed(),
             vs, box,
             context);
Index: gzz/gzz/view/ImageCellContentView.java
diff -u gzz/gzz/view/ImageCellContentView.java:1.2 
gzz/gzz/view/ImageCellContentView.java:1.3
--- gzz/gzz/view/ImageCellContentView.java:1.2  Wed Nov  6 12:41:22 2002
+++ gzz/gzz/view/ImageCellContentView.java      Thu Dec  5 20:03:51 2002
@@ -35,9 +35,8 @@
 
 /** A cell content view showing a cell's image.
  */
-
-public class ImageCellContentView extends CellContentView {
-public static final String rcsid = "$Id: ImageCellContentView.java,v 1.2 
2002/11/06 17:41:22 benja Exp $";
+public class ImageCellContentView extends CellView {
+public static final String rcsid = "$Id: ImageCellContentView.java,v 1.3 
2002/12/06 01:03:51 benja Exp $";
     public static boolean dbg = false;
     private static void p(String s) { if(dbg) pa(s); }
     private static void pa(String s) { System.err.println(s); }
Index: gzz/gzz/view/LastOpDecorator.java
diff -u gzz/gzz/view/LastOpDecorator.java:1.23 
gzz/gzz/view/LastOpDecorator.java:1.24
--- gzz/gzz/view/LastOpDecorator.java:1.23      Thu Nov 21 22:55:20 2002
+++ gzz/gzz/view/LastOpDecorator.java   Thu Dec  5 20:03:51 2002
@@ -34,7 +34,7 @@
  *  directional op entered.
  */
 public class LastOpDecorator implements FallbackSceneDecorator {
-String rcsid = "$Id: LastOpDecorator.java,v 1.23 2002/11/22 03:55:20 humppake 
Exp $";
+String rcsid = "$Id: LastOpDecorator.java,v 1.24 2002/12/06 01:03:51 benja Exp 
$";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
@@ -42,7 +42,6 @@
        GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 16);
     static Object key = new Object();
     static SimpleLinebreaker breaker = new SimpleLinebreaker();
-    static BoxCellView cvf = new BoxCellView();
 
     int padding = 15;
 
@@ -64,7 +63,6 @@
        Dimension size = sc.getSize();
 
        HChain ch = new LinebreakableChain();
-       cvf.setCenter(win.cursor);
 
         if(dbg) pa("fallback.binder.directOp: "+binder.directOp);
 
@@ -141,6 +139,6 @@
     HBox cell(Cell c, ViewContext context) {
        if(c == null) return text("[which cell?]");
 
-       return new CellHBox(c, cvf, context);
+       return new CellHBox(c, context.getCellView(), context);
     }
 }
Index: gzz/gzz/view/LinebrokenCellContentView.java
diff -u gzz/gzz/view/LinebrokenCellContentView.java:1.16 
gzz/gzz/view/LinebrokenCellContentView.java:1.17
--- gzz/gzz/view/LinebrokenCellContentView.java:1.16    Sun Nov 24 15:09:18 2002
+++ gzz/gzz/view/LinebrokenCellContentView.java Thu Dec  5 20:03:51 2002
@@ -38,9 +38,8 @@
 /** A cell content view showing a cell's text, broken into lines.
  *  Doesn't scroll, currently.
  */
-
-public class LinebrokenCellContentView extends CellContentView {
-public static final String rcsid = "$Id: LinebrokenCellContentView.java,v 1.16 
2002/11/24 20:09:18 benja Exp $";
+public class LinebrokenCellContentView extends CellView {
+public static final String rcsid = "$Id: LinebrokenCellContentView.java,v 1.17 
2002/12/06 01:03:51 benja Exp $";
     public static boolean dbg = false;
     private static void p(String s) { if(dbg) pa(s); }
     private static void pa(String s) { System.err.println(s); }
Index: gzz/gzz/view/LollipopCellView.java
diff -u gzz/gzz/view/LollipopCellView.java:1.5 
gzz/gzz/view/LollipopCellView.java:1.6
--- gzz/gzz/view/LollipopCellView.java:1.5      Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/LollipopCellView.java  Thu Dec  5 20:03:51 2002
@@ -38,9 +38,13 @@
 /** A factory for making ball-and-stick aka lollipop cell vobs. */
 
 public class LollipopCellView extends BoxCellView {
-public static final String rcsid = "$Id: LollipopCellView.java,v 1.5 
2002/11/23 13:44:20 benja Exp $";
+public static final String rcsid = "$Id: LollipopCellView.java,v 1.6 
2002/12/06 01:03:51 benja Exp $";
     float[] boxwh = new float[2];
 
+    public LollipopCellView(CellView ccv) {
+       super(ccv);
+    }
+
     /** Add the vobs that make up an image of a cell 
      * into the given coordinate
      * system of the given vobscene.
@@ -56,8 +60,6 @@
        if(d_clone == null)
            throw new NullPointerException("clone dim not set in 
LollipopCellView");
             
-        final CellInBox ccv = context.getCellContentView();
-
        /** Uses OvalBgVob as the ball. */
        final OvalBgVob bg = new OvalBgVob();
 
Index: gzz/gzz/view/MarkDecorator.java
diff -u gzz/gzz/view/MarkDecorator.java:1.15 
gzz/gzz/view/MarkDecorator.java:1.16
--- gzz/gzz/view/MarkDecorator.java:1.15        Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/MarkDecorator.java     Thu Dec  5 20:03:51 2002
@@ -33,7 +33,6 @@
 public class MarkDecorator implements FallbackSceneDecorator {
     static Object KEY = new Object(), TEXT_KEY = new Object();
     static final int PAD = 10;
-    static CellView cv = new BoxCellView();
     static TextStyle style =
        GraphicsAPI.getInstance().getTextStyle("SansSerif", Font.PLAIN, 12);
     static String str = "Marked cells:";
@@ -43,6 +42,7 @@
                        Fallback.Win win) {
        float[] size = new float[2];
 
+       CellView cv = win.getCellView();
        cv.getSize(null, win, size);
 
        int n = DefaultBinder.marks.size();
Index: gzz/gzz/view/MultitypeCellContentView.java
diff -u gzz/gzz/view/MultitypeCellContentView.java:1.11 
gzz/gzz/view/MultitypeCellContentView.java:1.12
--- gzz/gzz/view/MultitypeCellContentView.java:1.11     Sun Nov 24 15:40:49 2002
+++ gzz/gzz/view/MultitypeCellContentView.java  Thu Dec  5 20:03:51 2002
@@ -29,18 +29,18 @@
 /** A cell content view that uses a text- or pagespan view, dependent
  * on the type of content.
  */
-public class MultitypeCellContentView extends CellContentView {
-    CellInBox textView, pageView, imageView;
+public class MultitypeCellContentView extends CellView {
+    CellView textView, pageView, imageView;
     
-    public MultitypeCellContentView(CellInBox textView, 
-                                   CellInBox pageView,
-                                   CellInBox imageView) {
+    public MultitypeCellContentView(CellView textView, 
+                                   CellView pageView,
+                                   CellView imageView) {
         this.textView = textView;
         this.pageView = pageView;
        this.imageView = imageView;
     }
 
-    private CellInBox v(Cell c) {
+    private CellView v(Cell c) {
        if(c == null) return textView;
         VStreamCellTexter tex = (VStreamCellTexter)c.space.getCellTexter();
         Enfilade1D enf = tex.getEnfilade(c, null);
Index: gzz/gzz/view/RowColView.java
diff -u gzz/gzz/view/RowColView.java:1.14 gzz/gzz/view/RowColView.java:1.15
--- gzz/gzz/view/RowColView.java:1.14   Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/RowColView.java        Thu Dec  5 20:03:51 2002
@@ -47,7 +47,7 @@
     }
 
     public void render(VobScene sc, int into, ViewContext context) {
-        CellInBox fact = context.getCellView();
+        CellView fact = context.getCellView();
         Dimension size = sc.getSize();
 
         Dimension cellSize = new Dimension();
Index: gzz/gzz/view/TextCellContentView.java
diff -u gzz/gzz/view/TextCellContentView.java:1.32 
gzz/gzz/view/TextCellContentView.java:1.33
--- gzz/gzz/view/TextCellContentView.java:1.32  Wed Nov 27 04:34:45 2002
+++ gzz/gzz/view/TextCellContentView.java       Thu Dec  5 20:03:51 2002
@@ -37,9 +37,8 @@
 
 /** A cell content view showing a cell's text.
  */
-
-public class TextCellContentView extends CellContentView {
-public static final String rcsid = "$Id: TextCellContentView.java,v 1.32 
2002/11/27 09:34:45 mudyc Exp $";
+public class TextCellContentView extends CellView {
+public static final String rcsid = "$Id: TextCellContentView.java,v 1.33 
2002/12/06 01:03:51 benja Exp $";
     public static boolean dbg = false;
     private static void pa(String s) { System.err.println(s); }
 
Index: gzz/gzz/view/ViewContext.java
diff -u gzz/gzz/view/ViewContext.java:1.6 gzz/gzz/view/ViewContext.java:1.7
--- gzz/gzz/view/ViewContext.java:1.6   Fri Nov  1 20:23:45 2002
+++ gzz/gzz/view/ViewContext.java       Thu Dec  5 20:03:51 2002
@@ -42,7 +42,7 @@
  */
 
 public interface ViewContext {
-String rcsid = "$Id: ViewContext.java,v 1.6 2002/11/02 01:23:45 benja Exp $";
+String rcsid = "$Id: ViewContext.java,v 1.7 2002/12/06 01:03:51 benja Exp $";
 
     /** Get the accursed cell. */
     Cell getAccursed();
@@ -67,8 +67,7 @@
     boolean isMarked(Cell c);
     
     View getView();
-    CellInBox getCellView();
-    CellInBox getCellContentView();
+    CellView getCellView();
 
     /** Get the maincell of the window, if available.
      *  This cell can be used to acquire more metadata about how to
Index: gzz/gzz/view/VobVanishingClient.java
diff -u gzz/gzz/view/VobVanishingClient.java:1.23 
gzz/gzz/view/VobVanishingClient.java:1.24
--- gzz/gzz/view/VobVanishingClient.java:1.23   Sat Nov 23 08:44:20 2002
+++ gzz/gzz/view/VobVanishingClient.java        Thu Dec  5 20:03:51 2002
@@ -76,7 +76,7 @@
     }
 
     ViewContext context;
-    CellInBox cvf;
+    CellView cvf;
 
     float[] s = new float[2];
     public Object getVobSize(Cell c, float fract, int flags, Dimension outDim) 
{
Index: gzz/gzz/view/ZZViewContext.java
diff -u gzz/gzz/view/ZZViewContext.java:1.6 gzz/gzz/view/ZZViewContext.java:1.7
--- gzz/gzz/view/ZZViewContext.java:1.6 Fri Nov  1 20:23:45 2002
+++ gzz/gzz/view/ZZViewContext.java     Thu Dec  5 20:03:51 2002
@@ -39,7 +39,7 @@
  */
 
 public class ZZViewContext implements ViewContext {
-String rcsid = "$Id: ZZViewContext.java,v 1.6 2002/11/02 01:23:45 benja Exp $";
+String rcsid = "$Id: ZZViewContext.java,v 1.7 2002/12/06 01:03:51 benja Exp $";
 
     public final Cell window;
 
@@ -71,11 +71,7 @@
         throw new UnsupportedOperationException("not implemented");
     }
 
-    public CellInBox getCellView() {
-        throw new UnsupportedOperationException("not implemented");
-    }
-
-    public CellInBox getCellContentView() {
+    public CellView getCellView() {
         throw new UnsupportedOperationException("not implemented");
     }
 
Index: gzz/test/gzz/view/MockViewContext.java
diff -u gzz/test/gzz/view/MockViewContext.java:1.2 
gzz/test/gzz/view/MockViewContext.java:1.3
--- gzz/test/gzz/view/MockViewContext.java:1.2  Sun Nov 24 11:02:19 2002
+++ gzz/test/gzz/view/MockViewContext.java      Thu Dec  5 20:03:51 2002
@@ -29,12 +29,10 @@
     public Cell c;
     public View v;
     public CellView cv;
-    public CellContentView ccv;
     
     public Cell getAccursed() { return c; }
     public View getView() { return v; }
-    public CellInBox getCellView() { return cv; }
-    public CellInBox getCellContentView() { return ccv; }
+    public CellView getCellView() { return cv; }
     public boolean isMarked(Cell c) { return false; }
     public int getCursorOffset(Cell c) { return -1; }
     public List getCursorColors(Cell c) { return null; }




reply via email to

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