35 |
* the vob system will give up on interpolation and will jump. |
* the vob system will give up on interpolation and will jump. |
36 |
*/ |
*/ |
37 |
public class RowColView implements View.NamedView { |
public class RowColView implements View.NamedView { |
|
CellVobFactory fact = new CellVobFactory(); |
|
38 |
float spacing = 0.4f; |
float spacing = 0.4f; |
39 |
|
|
40 |
boolean column; |
boolean column; |
46 |
} |
} |
47 |
|
|
48 |
public void render(VobScene sc, int into, ViewContext context) { |
public void render(VobScene sc, int into, ViewContext context) { |
49 |
|
CellView fact = context.getCellView(); |
50 |
Dimension size = sc.getSize(); |
Dimension size = sc.getSize(); |
51 |
Dimension cellSize = fact.getDefaultSize(); |
Dimension cellSize = new Dimension(); |
52 |
|
fact.getDefaultSize(1, cellSize); |
53 |
|
|
54 |
int main, second; |
int main, second; |
55 |
if(column) { main = 0; second = 1; } |
if(column) { main = 0; second = 1; } |
85 |
int k[] = new int[2]; |
int k[] = new int[2]; |
86 |
for(k[main]=0; k[main] < n[main]; k[main]++) |
for(k[main]=0; k[main] < n[main]; k[main]++) |
87 |
for(k[second]=0; k[second] < n[second]; k[second]++) { |
for(k[second]=0; k[second] < n[second]; k[second]++) { |
88 |
cs[k[main]][k[second]] = sc.coords.coordsys( |
cs[k[main]][k[second]] = sc.coordsys( |
89 |
into, 0, |
into, grid[k[main]][k[second]], 0, |
90 |
xoffs + k[0]*xroom, yoffs + k[1]*yroom, |
xoffs + k[0]*xroom, yoffs + k[1]*yroom, 2, 2); |
|
cellSize.width, cellSize.height); |
|
|
sc.matcher.add(cs[k[main]][k[second]], |
|
|
grid[k[main]][k[second]]); |
|
91 |
} |
} |
92 |
|
|
|
fact.setSpace(center.space); |
|
93 |
for(int i=0; i<n[main]; i++) |
for(int i=0; i<n[main]; i++) |
94 |
for(int j=0; j<n[second]; j++) |
for(int j=0; j<n[second]; j++) |
95 |
if(grid[i][j] != null) |
if(grid[i][j] != null) |
96 |
break; // XXX |
fact.place(grid[i][j], sc, cs[i][j], |
97 |
/* |
cellSize.width, cellSize.height, |
98 |
fact.addCellVobs(grid[i][j], into, sc, cs[i][j], null, context, 1); |
context, 1); |
|
*/ |
|
99 |
|
|
100 |
Vob conn[] = new Vob[] { |
Vob conn[] = new Vob[] { |
101 |
new SimpleConnection(1, 0, -1, 0), |
new SimpleConnection(1, 0, -1, 0), |