[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp PPActionsImpl.java PPView2.j...
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp PPActionsImpl.java PPView2.j... |
Date: |
Thu, 09 Jan 2003 11:51:07 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/01/09 11:51:07
Modified files:
gzz/modules/pp : PPActionsImpl.java PPView2.java demotest.py
Added files:
gzz/modules/pp : drafts.rst
Log message:
some work.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/drafts.rst?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPActionsImpl.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.50&tr2=1.51&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp/PPActionsImpl.java
diff -u gzz/gzz/modules/pp/PPActionsImpl.java:1.10
gzz/gzz/modules/pp/PPActionsImpl.java:1.11
--- gzz/gzz/modules/pp/PPActionsImpl.java:1.10 Sun Jan 5 06:22:00 2003
+++ gzz/gzz/modules/pp/PPActionsImpl.java Thu Jan 9 11:51:07 2003
@@ -123,6 +123,18 @@
Cell assoc = space.getCell(assocId);
note.zzclone().connect(d.association, side, assoc.zzclone());
}}
+ public void detachNotes(String id1, int side, String id2)
+ throws RemoteException { synchronized(space) {
+ /*
+ urgh...
+
+ Cell c1 = space.getCell(id1).s(d.association);
+ Cell c2 = space.getCell(id2).s(d.association);
+
+ c1.disconnect(d.association, side);
+ */
+ }}
+
public void insertText(String noteId, int offs, String text)
throws RemoteException { synchronized(space) {
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.46
gzz/gzz/modules/pp/PPView2.java:1.47
--- gzz/gzz/modules/pp/PPView2.java:1.46 Thu Jan 9 07:15:31 2003
+++ gzz/gzz/modules/pp/PPView2.java Thu Jan 9 11:51:07 2003
@@ -36,7 +36,7 @@
import java.util.*;
public class PPView2 implements View {
-public static final String rcsid = "$Id: PPView2.java,v 1.46 2003/01/09
12:15:31 mudyc Exp $";
+public static final String rcsid = "$Id: PPView2.java,v 1.47 2003/01/09
16:51:07 mudyc Exp $";
public static boolean dbg = true;
private static void pa(String s) { System.err.println(s); }
@@ -661,7 +661,45 @@
+ public void dump(Cell cc) {
+ pa("**** dump *******"+cc);
+ Vector v = new Vector();
+
+ // add
+ for (Cell c = cc.h(d.contains).s(d.contains);
+ c != null; c = c.s(d.contains)) {
+ v.add(c);
+ }
+
+ // sort
+ for (int i=0; i+1<v.size(); i++) {
+ Cell c = (Cell)v.get(i);
+ int y = Integer.parseInt(c.s(d.pan).s(d.pan).t());
+
+ Cell swap = c;
+ int swap_y = y;
+ int swap_index = i;
+
+ for (int j=i+1; j<v.size(); j++) {
+ Cell cur = (Cell)v.get(j);
+ int cur_y = Integer.parseInt(cur.s(d.pan).s(d.pan).t());
+ if (cur_y < swap_y) {
+ swap = cur;
+ swap_y = cur_y;
+ swap_index = j;
+ }
+ }
+ // swap
+ v.set(i, swap);
+ v.set(swap_index, c);
+ }
+ // output
+ for (int i=0; i<v.size(); i++) {
+ Cell c = (Cell)v.get(i);
+ pa("text: " +c.t()+", y:"+c.s(d.pan).s(d.pan).t());
+ }
+ }
Index: gzz/gzz/modules/pp/demotest.py
diff -u gzz/gzz/modules/pp/demotest.py:1.50 gzz/gzz/modules/pp/demotest.py:1.51
--- gzz/gzz/modules/pp/demotest.py:1.50 Thu Jan 9 07:15:31 2003
+++ gzz/gzz/modules/pp/demotest.py Thu Jan 9 11:51:07 2003
@@ -114,6 +114,9 @@
def key(self, key):
+ if key == "Ctrl-T":
+ c = self.avc.getAccursed()
+ self.ppv.dump(c)
if key == "Ctrl-Y":
self.ppv.test_Y = 1
if key == "Ctrl-U":