/[gzz]/gzz/gzz/view/RowColView.java
ViewVC logotype

Diff of /gzz/gzz/view/RowColView.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by tjl, Fri Sep 27 09:07:56 2002 UTC revision 1.5 by benja, Sat Oct 5 13:59:47 2002 UTC
# Line 35  import java.awt.Dimension; Line 35  import java.awt.Dimension;
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;
# Line 47  public class RowColView implements View. Line 46  public class RowColView implements View.
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; }
# Line 84  public class RowColView implements View. Line 85  public class RowColView implements View.
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),

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26