[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz view/CellContentView.java view/CellHBox...
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/gzz view/CellContentView.java view/CellHBox... |
Date: |
Mon, 14 Oct 2002 06:11:13 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/10/14 06:11:13
Modified files:
gzz/view : CellContentView.java CellHBox.java
CellView.java CellVobFactory.java
FullScreenView.java
LinebrokenCellContentView.java
MarkDecorator.java
MultitypeCellContentView.java RowColView.java
TextCellContentView.java
VobVanishingClient.java
Added files:
gzz/vob : Box.java
Log message:
Temporary Box class - once we're sure about the semantics, this should
probably move to VobCoorder
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellContentView.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellHBox.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellView.java.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/CellVobFactory.java.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/FullScreenView.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/LinebrokenCellContentView.java.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/MarkDecorator.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/MultitypeCellContentView.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/RowColView.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/TextCellContentView.java.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/VobVanishingClient.java.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/vob/Box.java?rev=1.1
Patches:
Index: gzz/gzz/view/CellContentView.java
diff -c gzz/gzz/view/CellContentView.java:1.5
gzz/gzz/view/CellContentView.java:1.6
*** gzz/gzz/view/CellContentView.java:1.5 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/CellContentView.java Mon Oct 14 06:11:12 2002
***************
*** 33,43 ****
* with different kinds of boxes.
*/
public interface CellContentView {
! String rcsid = "$Id: CellContentView.java,v 1.5 2002/10/14 08:17:12 tjl 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.
*/
! void place(Cell c, VobScene sc, int coordsys, float w, float h,
ViewContext context, float scale);
}
--- 33,43 ----
* with different kinds of boxes.
*/
public interface CellContentView {
! String rcsid = "$Id: CellContentView.java,v 1.6 2002/10/14 10:11:12 tjl 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.
*/
! void place(Cell c, VobScene sc, Box b,
ViewContext context, float scale);
}
Index: gzz/gzz/view/CellHBox.java
diff -c gzz/gzz/view/CellHBox.java:1.6 gzz/gzz/view/CellHBox.java:1.7
*** gzz/gzz/view/CellHBox.java:1.6 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/CellHBox.java Mon Oct 14 06:11:12 2002
***************
*** 61,67 ****
public void place(VobScene vs, int coordsys, float scale) {
float w = getWidth(scale), h = getHeight(scale)+getDepth(scale);
! view.place(cell, vs, coordsys, w, h, context);
}
public void setPrev(HBox b) {}
--- 61,69 ----
public void place(VobScene vs, int coordsys, float scale) {
float w = getWidth(scale), h = getHeight(scale)+getDepth(scale);
! Box b = new Box();
! b.set(vs, coordsys, w, h);
! view.place(cell, vs, b, context);
}
public void setPrev(HBox b) {}
Index: gzz/gzz/view/CellView.java
diff -c gzz/gzz/view/CellView.java:1.5 gzz/gzz/view/CellView.java:1.6
*** gzz/gzz/view/CellView.java:1.5 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/CellView.java Mon Oct 14 06:11:12 2002
***************
*** 30,44 ****
public interface CellView {
/** Place a single cell.
! * @param coordsys The coordinate system into which to
! * place the cell. The coordinate system
! * is to be a mapping from the
! * rectangle (0,w)x(0,h) onto screen
! * coordinates.
*/
! void place(Cell c, VobScene vs,
! int coordsys, float w, float h, // for now
! ViewContext context);
/** Get the default size of a cell at a given scale.
* Writes the result into a <code>Dimension</code> object.
--- 30,39 ----
public interface CellView {
/** Place a single cell.
! * @param Box The box into which to
! * place the cell.
*/
! void place(Cell c, VobScene vs, Box b, ViewContext context);
/** Get the default size of a cell at a given scale.
* Writes the result into a <code>Dimension</code> object.
Index: gzz/gzz/view/CellVobFactory.java
diff -c gzz/gzz/view/CellVobFactory.java:1.22
gzz/gzz/view/CellVobFactory.java:1.23
*** gzz/gzz/view/CellVobFactory.java:1.22 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/CellVobFactory.java Mon Oct 14 06:11:12 2002
***************
*** 46,52 ****
*/
public class CellVobFactory implements CellView {
! public static final String rcsid = "$Id: CellVobFactory.java,v 1.22
2002/10/14 08:17:12 tjl 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); }
--- 46,52 ----
*/
public class CellVobFactory implements CellView {
! public static final String rcsid = "$Id: CellVobFactory.java,v 1.23
2002/10/14 10:11:12 tjl 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); }
***************
*** 134,141 ****
* @param h The w
* when mapped .
*/
! public void place(final Cell c, final VobScene v, final int cs,
! final float w, final float h,
final ViewContext context) {
setCenter(context.getAccursed());
if(d_clone == null)
--- 134,141 ----
* @param h The w
* when mapped .
*/
! public void place(final Cell c, final VobScene v,
! final Box box,
final ViewContext context) {
setCenter(context.getAccursed());
if(d_clone == null)
***************
*** 166,193 ****
bg.setBg(bg.getBg().darker().darker());
}
! /*
! if(c.s(d_spaces, -1) != null) // if includes a slice
! bg.setBg(new Color(bg.getBg().getRGB() & (int)0xff00ffffL));
! */
!
! final int content_cs = v.coordsys(cs, CONTENT_KEY, 0, 5, 5, 2, 2);
! final int cs_box = v.coordsys(cs, BOX_KEY, 0, 0, 0, w, h);
if(!(GraphicsAPI.getInstance() instanceof gzz.client.gl.GLAPI)) {
! ccv.place(c, v, content_cs, w-10, h-10, context, 1);
! v.map.put(bg, cs_box);
} else {
! v.map.put(bg, cs_box);
gzz.gfx.gl.Stencil.drawStenciled(
v,
new Runnable() { public void run() {
! v.map.put(bg, cs_box);
}},
null,
null,
new Runnable() { public void run() {
! ccv.place(c, v, content_cs, w-10, h-10, context, 1);
}},
false
);
--- 166,189 ----
bg.setBg(bg.getBg().darker().darker());
}
! final Box contentBox = new Box();
! float pad = 5;
! contentBox.setSubWH(box, "CO", pad, pad, box.getWidth()-2*pad,
box.getHeight()-2*pad);
if(!(GraphicsAPI.getInstance() instanceof gzz.client.gl.GLAPI)) {
! ccv.place(c, v, contentBox, context, 1);
! v.map.put(bg, box.getUnitCoordsys());
} else {
! v.map.put(bg, box.getUnitCoordsys());
gzz.gfx.gl.Stencil.drawStenciled(
v,
new Runnable() { public void run() {
! v.map.put(bg, box.getUnitCoordsys());
}},
null,
null,
new Runnable() { public void run() {
! ccv.place(c, v, contentBox, context, 1);
}},
false
);
Index: gzz/gzz/view/FullScreenView.java
diff -c gzz/gzz/view/FullScreenView.java:1.2
gzz/gzz/view/FullScreenView.java:1.3
*** gzz/gzz/view/FullScreenView.java:1.2 Tue Oct 1 10:06:36 2002
--- gzz/gzz/view/FullScreenView.java Mon Oct 14 06:11:12 2002
***************
*** 27,37 ****
/** A view that shows only the accursed cell, full-screen.
*/
public class FullScreenView implements View {
! public void render(VobScene scene, int into, ViewContext context) {
! java.awt.Dimension size = scene.getSize();
context.getCellContentView().place(
context.getAccursed(),
! scene, into, size.width, size.height,
context, 1);
}
}
--- 27,39 ----
/** A view that shows only the accursed cell, full-screen.
*/
public class FullScreenView implements View {
! public void render(VobScene vs, int into, ViewContext context) {
! java.awt.Dimension size = vs.getSize();
! Box b = new Box();
! b.set(vs, 0, size.width, size.height);
context.getCellContentView().place(
context.getAccursed(),
! vs, b,
context, 1);
}
}
Index: gzz/gzz/view/LinebrokenCellContentView.java
diff -c gzz/gzz/view/LinebrokenCellContentView.java:1.10
gzz/gzz/view/LinebrokenCellContentView.java:1.11
*** gzz/gzz/view/LinebrokenCellContentView.java:1.10 Tue Oct 8 18:55:18 2002
--- gzz/gzz/view/LinebrokenCellContentView.java Mon Oct 14 06:11:12 2002
***************
*** 38,44 ****
*/
public class LinebrokenCellContentView implements CellContentView {
! public static final String rcsid = "$Id: LinebrokenCellContentView.java,v
1.10 2002/10/08 22:55:18 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); }
--- 38,44 ----
*/
public class LinebrokenCellContentView implements CellContentView {
! public static final String rcsid = "$Id: LinebrokenCellContentView.java,v
1.11 2002/10/14 10:11:12 tjl 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); }
***************
*** 62,73 ****
}
static Rectangle box = new Rectangle();
! public void place(Cell c, VobScene vs, int coordsys, float w, float h,
ViewContext context, float scale) {
HChain ch = getChain(c, scale);
! if(dbg) pa(""+w);
! HBroken br = breaker.breakLines(ch, w, scale);
! br.put(vs, coordsys);
}
protected HChain getChain(Cell c, float scale) {
--- 62,73 ----
}
static Rectangle box = new Rectangle();
! public void place(Cell c, VobScene vs, Box box,
ViewContext context, float scale) {
HChain ch = getChain(c, scale);
! if(dbg) pa(""+box.getWidth());
! HBroken br = breaker.breakLines(ch, box.getWidth(), scale);
! br.put(vs, box.getWHCoordsys());
}
protected HChain getChain(Cell c, float scale) {
Index: gzz/gzz/view/MarkDecorator.java
diff -c gzz/gzz/view/MarkDecorator.java:1.6 gzz/gzz/view/MarkDecorator.java:1.7
*** gzz/gzz/view/MarkDecorator.java:1.6 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/MarkDecorator.java Mon Oct 14 06:11:13 2002
***************
*** 37,76 ****
static String str = "Marked cells:";
! public void render(VobScene sc, int into, Fallback fallback,
Fallback.Win win) {
! java.awt.Dimension box = new java.awt.Dimension();
! cv.getDefaultSize(1, box);
int n = fallback.binder.marks.size();
if(n == 0) return;
! float w = box.width, h = n * box.height;
! java.awt.Dimension outer = sc.getSize();
float x = outer.width - w - PAD,
y = outer.height - h - PAD;
! int cs_list = sc.coordsys(into, KEY, 0, x, y, 2, 2);
for(int i=0; i<n; i++) {
Mark m = (Mark)fallback.binder.marks.get(i);
if(m.spans != null) return; // for now-- should show span(s)
Cell c = m.cell;
! int cs = sc.coordsys(cs_list, c, 0, 0, i*box.height, 2, 2);
! cv.place(c, sc, cs, box.width, box.height, win);
}
w = style.getWidth(str, 1);
h = style.getHeight(1);
y -= h;
! if(w > box.width)
! x += box.width - w;
! int cs = sc.coordsys(into, TEXT_KEY, 0, x, y, 2, 2);
! sc.map.put(new TextVob(style, str), cs);
}
}
--- 37,79 ----
static String str = "Marked cells:";
! public void render(VobScene vs, int into, Fallback fallback,
Fallback.Win win) {
! java.awt.Dimension boxsize = new java.awt.Dimension();
! cv.getDefaultSize(1, boxsize);
int n = fallback.binder.marks.size();
if(n == 0) return;
! float w = boxsize.width, h = n * boxsize.height;
! java.awt.Dimension outer = vs.getSize();
float x = outer.width - w - PAD,
y = outer.height - h - PAD;
! int cs_list = vs.coordsys(into, KEY, 0, x, y, 2, 2);
!
! Box b = new Box();
for(int i=0; i<n; i++) {
Mark m = (Mark)fallback.binder.marks.get(i);
if(m.spans != null) return; // for now-- should show span(s)
Cell c = m.cell;
! int cs = vs.coordsys(cs_list, c, 0, 0, i*boxsize.height, 1, 1);
! b.set(vs, cs, boxsize.width, boxsize.height);
! cv.place(c, vs, b, win);
}
w = style.getWidth(str, 1);
h = style.getHeight(1);
y -= h;
! if(w > boxsize.width)
! x += boxsize.width - w;
! int cs = vs.coordsys(into, TEXT_KEY, 0, x, y, 2, 2);
! vs.map.put(new TextVob(style, str), cs);
}
}
Index: gzz/gzz/view/MultitypeCellContentView.java
diff -c gzz/gzz/view/MultitypeCellContentView.java:1.3
gzz/gzz/view/MultitypeCellContentView.java:1.4
*** gzz/gzz/view/MultitypeCellContentView.java:1.3 Tue Oct 1 10:06:36 2002
--- gzz/gzz/view/MultitypeCellContentView.java Mon Oct 14 06:11:13 2002
***************
*** 37,51 ****
this.pageView = pageView;
}
! public void place(Cell c, VobScene sc, int coordsys, float w, float h,
ViewContext context, float scale) {
VStreamCellTexter tex = (VStreamCellTexter)c.space.getCellTexter();
Enfilade1D enf = tex.getEnfilade(c, null);
if(enf.length() == 0) return;
Object firstSpan = enf.getList().get(0);
if(firstSpan instanceof PageSpan)
! pageView.place(c, sc, coordsys, w, h, context, scale);
else
! textView.place(c, sc, coordsys, w, h, context, scale);
}
}
--- 37,51 ----
this.pageView = pageView;
}
! public void place(Cell c, VobScene sc, Box box,
ViewContext context, float scale) {
VStreamCellTexter tex = (VStreamCellTexter)c.space.getCellTexter();
Enfilade1D enf = tex.getEnfilade(c, null);
if(enf.length() == 0) return;
Object firstSpan = enf.getList().get(0);
if(firstSpan instanceof PageSpan)
! pageView.place(c, sc, box, context, scale);
else
! textView.place(c, sc, box, context, scale);
}
}
Index: gzz/gzz/view/RowColView.java
diff -c gzz/gzz/view/RowColView.java:1.6 gzz/gzz/view/RowColView.java:1.7
*** gzz/gzz/view/RowColView.java:1.6 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/RowColView.java Mon Oct 14 06:11:13 2002
***************
*** 90,101 ****
xoffs + k[0]*xroom, yoffs + k[1]*yroom, 2, 2);
}
for(int i=0; i<n[main]; i++)
for(int j=0; j<n[second]; j++)
! if(grid[i][j] != null)
! fact.place(grid[i][j], sc, cs[i][j],
! cellSize.width, cellSize.height,
! context);
Vob conn[] = new Vob[] {
new SimpleConnection(1, 0, -1, 0),
--- 90,102 ----
xoffs + k[0]*xroom, yoffs + k[1]*yroom, 2, 2);
}
+ Box b = new Box();
for(int i=0; i<n[main]; i++)
for(int j=0; j<n[second]; j++)
! if(grid[i][j] != null) {
! b.set(sc, cs[i][j], cellSize.width, cellSize.height);
! fact.place(grid[i][j], sc, b, context);
! }
Vob conn[] = new Vob[] {
new SimpleConnection(1, 0, -1, 0),
Index: gzz/gzz/view/TextCellContentView.java
diff -c gzz/gzz/view/TextCellContentView.java:1.16
gzz/gzz/view/TextCellContentView.java:1.17
*** gzz/gzz/view/TextCellContentView.java:1.16 Tue Oct 8 03:34:54 2002
--- gzz/gzz/view/TextCellContentView.java Mon Oct 14 06:11:13 2002
***************
*** 37,43 ****
*/
public class TextCellContentView implements CellContentView {
! public static final String rcsid = "$Id: TextCellContentView.java,v 1.16
2002/10/08 07:34:54 tjl 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); }
--- 37,43 ----
*/
public class TextCellContentView implements CellContentView {
! public static final String rcsid = "$Id: TextCellContentView.java,v 1.17
2002/10/14 10:11:13 tjl 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); }
***************
*** 51,57 ****
this.style = style;
}
! public void place(Cell c, VobScene v, int cs, float w, float h,
ViewContext context, float scale) {
String s = c.t();
if (s == null) s = "";
--- 51,57 ----
this.style = style;
}
! public void place(Cell c, VobScene v, Box box,
ViewContext context, float scale) {
String s = c.t();
if (s == null) s = "";
***************
*** 77,94 ****
float left = style.getWidth(s.substring(0, center), scale);
float right = width - left;
! float middle = w / 2.0f;
! float skew;
! if(width < w) skew = 0;
! else if(left < middle) skew = 0;
! else if(right < middle) skew = (- width + w);
! else skew = (- left + middle);
Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);
! int skewedcs = v.coordsys(cs, key, 0, skew, 0, 2, 2);
! placeVob(c, v, skewedcs, w, h, brBefore, brAfter, offs, context,
scale);
}
static Object WH_KEY = new Object();
--- 77,95 ----
float left = style.getWidth(s.substring(0, center), scale);
float right = width - left;
! float middle = box.getWidth() / 2.0f;
! // Possibly offset text so cursor is visible.
! float textOffset;
! if(width < box.getWidth()) textOffset = 0;
! else if(left < middle) textOffset = 0;
! else if(right < middle) textOffset = (- width + box.getWidth());
! else textOffset = (- left + middle);
Object key = (line < KEY.length) ? KEY[line] : new Integer(line+1);
! int offsetcs = v.coordsys(box.getWHCoordsys(), key, 0, textOffset, 0,
1, 1);
! placeVob(c, v, offsetcs, box.getWidth(), box.getHeight(), brBefore,
brAfter, offs, context, scale);
}
static Object WH_KEY = new Object();
Index: gzz/gzz/view/VobVanishingClient.java
diff -c gzz/gzz/view/VobVanishingClient.java:1.16
gzz/gzz/view/VobVanishingClient.java:1.17
*** gzz/gzz/view/VobVanishingClient.java:1.16 Mon Oct 14 04:17:12 2002
--- gzz/gzz/view/VobVanishingClient.java Mon Oct 14 06:11:13 2002
***************
*** 99,188 ****
vanishing.render(this, context, d.width / 2, d.height / 2);
}
- /*
- public void render(VobScene into, Cell window) {
- Dimension d = into.getSize();
- render(into, window, d.width / 2, d.height / 2);
- }
-
- public void render(VobScene into, Cell window, int x, int y) {
- render(into, window, Cursor.get(window), x, y);
- }
- */
-
ViewContext context;
CellView cvf;
-
- /*
-
- public void render(VobScene into, Cell window, Cell cursor, int px, int
py) {
-
- this.into = into;
- cvf.setCenter(cursor);
- dims = UnifiedBinder.readDims(window);
-
- vanishing.render(this, cursor, px, py, dims);
-
- int w = 60; int h = 20;
-
-
- // XXXX SpanView (uses multiple PlainVanishings) draws extra lines
- // if decorate is called here... :-/
- // decorate(into);
-
- // Place the dimension cells
- // XXX This must be abstracted out to somewhere!
-
- Dimension d = cvf.getDefaultSize();
- int dw = d.width;
- int dh = d.height;
-
- Cell dimc = Params.getParam(window, Client.c_dims);
-
- int cs = into.coords.coordsys(null, 1, 0, 0, dw, dh);
- cvf.addCellVobs(dimc, into, cs, null);
-
- dimc = dimc.s(Client.d1);
- int y = dh;
- while (dimc != null) {
- int x = 0;
- Cell c = dimc;
- while (c != null) {
- cs = into.coords.coordsys(null, 1, x, y, dw, dh);
- cvf.addCellVobs(c, into, cs, null);
- x += dw;
- c = c.s(Client.d2);
- }
- y += dh;
- dimc = dimc.s(Client.d1);
- }
- }
- */
public Object getVobSize(Cell c, float fract, int flags, Dimension
outDim) {
cvf.getDefaultSize(fract, outDim);
return null;
}
public void place(Cell c, Object o, float fract, int x0, int y0, int x1,
int y1,
int depth, float rot) {
Vob v = (Vob)o;
int cs = into.coordsys(intoCS, c, depth, x0, y0, fract, fract);
! cvf.place(c, into, cs, (x1-x0)/fract, (y1-y0)/fract, context);
}
public void connect(Cell cell1, Cell cell2, int dx, int dy) {
! int cs1 = into.matcher.getCS(cell1);
! int cs2 = into.matcher.getCS(cell2);
! if(cs1 < 0 && cs2 < 0)
throw new Error("Neither cell seems to have been put, yet");
! else if(cs2 < 0)
! into.map.put(pstubs[dx], cs1);
! else if(cs1 < 0)
! into.map.put(nstubs[dx], cs2);
else
! into.map.put(connections[dx][dy], cs1, cs2);
}
}
--- 99,136 ----
vanishing.render(this, context, d.width / 2, d.height / 2);
}
ViewContext context;
CellView cvf;
public Object getVobSize(Cell c, float fract, int flags, Dimension
outDim) {
cvf.getDefaultSize(fract, outDim);
return null;
}
+ Map cell2Box = new HashMap();
+
public void place(Cell c, Object o, float fract, int x0, int y0, int x1,
int y1,
int depth, float rot) {
Vob v = (Vob)o;
int cs = into.coordsys(intoCS, c, depth, x0, y0, fract, fract);
! Box b = new Box();
! b.set(into, cs, (x1-x0)/fract, (y1-y0)/fract);
! cell2Box.put(c, b);
! cvf.place(c, into, b, context);
}
public void connect(Cell cell1, Cell cell2, int dx, int dy) {
! Box b1 = (Box)cell2Box.get(cell1);
! Box b2 = (Box)cell2Box.get(cell2);
! if(b1 == null && b2 == null)
throw new Error("Neither cell seems to have been put, yet");
! else if(b2 == null)
! into.map.put(pstubs[dx], b1.getUnitCoordsys());
! else if(b1 == null)
! into.map.put(nstubs[dx], b2.getUnitCoordsys());
else
! into.map.put(connections[dx][dy], b1.getUnitCoordsys(),
b2.getUnitCoordsys());
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gzz view/CellContentView.java view/CellHBox...,
Tuomas J. Lukka <=