[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/view xubuoy.py
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/gzz/view xubuoy.py |
Date: |
Sat, 23 Nov 2002 14:20:09 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/11/23 14:20:09
Modified files:
gzz/view : xubuoy.py
Log message:
Argl: Fix xubuoy.py. We need unittests for the demos...
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/xubuoy.py.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
Patches:
Index: gzz/gzz/view/xubuoy.py
diff -u gzz/gzz/view/xubuoy.py:1.33 gzz/gzz/view/xubuoy.py:1.34
--- gzz/gzz/view/xubuoy.py:1.33 Sat Nov 23 14:03:35 2002
+++ gzz/gzz/view/xubuoy.py Sat Nov 23 14:20:08 2002
@@ -101,9 +101,9 @@
style = gzz.client.GraphicsAPI.getInstance().getTextStyle("SansSerif",
java.awt.Font.PLAIN, 10)
contview = gzz.view.LinebrokenCellContentView(style)
-cellview = gzz.view.BoxCellView(contview)
+cellview = gzz.view.BoxCellView()
-class EmptyContext(gzz.view.ViewContext):
+class MyContext(gzz.view.ViewContext):
emptylist = java.util.ArrayList()
getAccursed = lambda self: None
getCursorColors = lambda self, c: self.emptylist
@@ -111,11 +111,11 @@
getCursorOffset = lambda self, c: -1
isMarked = lambda self, c: 0
getView = lambda self: None
- getCellView = lambda self: None
- getCellContentView = lambda self: None
+ getCellView = lambda self: cellview
+ getCellContentView = lambda self: contview
getWindow = lambda self: None
-emptyContext = EmptyContext()
+myContext = MyContext()
DEFAULT_TEXT_WIDTH = 200
def puttext(cell, vs, cs, scale):
@@ -123,7 +123,7 @@
h = contview.getHeight(cell, w, scale)
cs_t = vs.coords.translate(cs, -w/2.0, -h/2.0)
vs.matcher.add(cs, cell.getId()+"__text")
- cellview.place(cell, vs, cs_t, w, h, emptyContext, scale)
+ cellview.place(cell, vs, cs_t, w, h, myContext, scale)
lineconn = GLRen.createLineConnector(0,0)