39 |
*/ |
*/ |
40 |
public interface Floater { |
public interface Floater { |
41 |
/** Create a buoy. |
/** Create a buoy. |
42 |
* @param b The box of the anchor. |
* @param anchor The (box) coordinate system of the anchor. |
43 |
* @param c The cell which is the center of the new buoy. |
* @param c The cell which is the center of the new buoy. |
44 |
* @param connectedFrom The cell which was placed |
* @param connectedFrom The cell which was placed |
45 |
*/ |
*/ |
46 |
void buoy(Box b, Cell c, Cell connectedFrom); |
void buoy(int anchor, Cell c, Cell connectedFrom); |
47 |
} |
} |
48 |
|
|
49 |
private Dim d_clone; |
private Dim d_clone; |
59 |
this.d_assoc = d_assoc; |
this.d_assoc = d_assoc; |
60 |
} |
} |
61 |
|
|
62 |
public void placed(Cell c, VobScene sc, Box b, ViewContext context) { |
public void placed(Cell c, VobScene sc, int box, ViewContext context) { |
63 |
for(Cell assoc = c; assoc != null; |
for(Cell assoc = c; assoc != null; |
64 |
assoc = assoc.s(d_clone)) { |
assoc = assoc.s(d_clone)) { |
65 |
Cell left = assoc.s(d_assoc, -1); |
Cell left = assoc.s(d_assoc, -1); |
67 |
if(dbg) pa("BUOYS: LINKS"); |
if(dbg) pa("BUOYS: LINKS"); |
68 |
if(dbg) pa("left: "+left+" right: "+right); |
if(dbg) pa("left: "+left+" right: "+right); |
69 |
if(right != null) { |
if(right != null) { |
70 |
rightfloater.buoy(b, right.h(d_clone), c); |
rightfloater.buoy(box, right.h(d_clone), c); |
71 |
} |
} |
72 |
if(left != null) { |
if(left != null) { |
73 |
leftfloater.buoy(b, left.h(d_clone), c); |
leftfloater.buoy(box, left.h(d_clone), c); |
74 |
} |
} |
75 |
} |
} |
76 |
|
|