[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/lava/gzz/loom Loom.java SimpleView.java
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz/lava/gzz/loom Loom.java SimpleView.java |
Date: |
Sun, 23 Feb 2003 15:43:40 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 03/02/23 15:43:40
Modified files:
lava/gzz/loom : Loom.java SimpleView.java
Log message:
show text in cells
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/loom/Loom.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/gzz/loom/SimpleView.java.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
Patches:
Index: gzz/lava/gzz/loom/Loom.java
diff -u gzz/lava/gzz/loom/Loom.java:1.6 gzz/lava/gzz/loom/Loom.java:1.7
--- gzz/lava/gzz/loom/Loom.java:1.6 Sun Feb 23 11:50:27 2003
+++ gzz/lava/gzz/loom/Loom.java Sun Feb 23 15:43:40 2003
@@ -68,7 +68,10 @@
final NodeView nodeView = new NodeView() {
public void render(VobScene sc, int into, RDFNode node) {
sc.map.put(bg, into);
- //sc.map.put(new TextVob(style, "Hi"), into);
+ String s = node.toString();
+ if(s.length() > 25) s = s.substring(s.length()-25);
+ sc.map.put(new TextVob(style, s),
+ sc.unitSqCS(into, "text"));
}
};
final Shower s = new Shower() {
Index: gzz/lava/gzz/loom/SimpleView.java
diff -u gzz/lava/gzz/loom/SimpleView.java:1.21
gzz/lava/gzz/loom/SimpleView.java:1.22
--- gzz/lava/gzz/loom/SimpleView.java:1.21 Sun Feb 23 15:19:10 2003
+++ gzz/lava/gzz/loom/SimpleView.java Sun Feb 23 15:43:40 2003
@@ -54,9 +54,13 @@
this.nodeView = nodeView;
}
+ protected int sizex = 250, sizey = 20;
+ protected int gapx = 50, gapy = 30;
+
public void render(VobScene sc, int into, Cursor c) {
int midx = sc.size.width/2, midy = sc.size.height/2;
- int cs = sc.orthoBoxCS(into, c.focus, 0, midx-25, midy-10, 1, 1, 50,
20);
+ int cs = sc.orthoBoxCS(into, c.focus, 0, midx-sizex/2, midy-sizey/2,
+ 1, 1, sizex, sizey);
nodeView.render(sc, cs, c.focus);
SortedSet nodes = c.getConnections(1);
@@ -67,25 +71,27 @@
else
before = 0;
- int x = midx + 75, y = midy-10-before*50;
+ int x = midx + gapx + sizex/2,
+ y = midy - sizey/2 - before*(gapy+sizey);
for(Iterator j=nodes.iterator(); j.hasNext();) {
RDFNode node = (RDFNode)j.next();
- int cs2 = sc.orthoBoxCS(into, node, 0, x, y, 1, 1, 50, 20);
+ int cs2 = sc.orthoBoxCS(into, node, 0, x, y, 1, 1, sizex, sizey);
nodeView.render(sc, cs2, node);
sc.map.put(conn, cs, cs2);
- y += 50;
+ y += sizey + gapy;
}
nodes = c.getConnections(-1);
- x = midx - 75 - 50; y = midy-10-before*50;
+ x = midx - gapx - sizex - sizex/2;
+ y = midy - sizey/2 - before*(gapy+sizey);
for(Iterator j=nodes.iterator(); j.hasNext();) {
RDFNode node = (RDFNode)j.next();
- int cs2 = sc.orthoBoxCS(into, node, 0, x, y, 1, 1, 50, 20);
+ int cs2 = sc.orthoBoxCS(into, node, 0, x, y, 1, 1, sizex, sizey);
nodeView.render(sc, cs2, node);
sc.map.put(conn, cs2, cs);
- y += 50;
+ y += sizey + gapy;
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/lava/gzz/loom Loom.java SimpleView.java,
Benja Fallenstein <=