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

Diff of /gzz/gzz/view/MultitypeCellContentView.java

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

revision 1.4 by tjl, Mon Oct 14 10:11:13 2002 UTC revision 1.5 by tjl, Tue Oct 29 07:30:58 2002 UTC
# Line 28  import gzz.vob.*; Line 28  import gzz.vob.*;
28  /** A cell content view that uses a text- or pagespan view, dependent  /** A cell content view that uses a text- or pagespan view, dependent
29   * on the type of content.   * on the type of content.
30   */   */
31  public class MultitypeCellContentView implements CellContentView {  public class MultitypeCellContentView extends CellContentView {
32      CellContentView textView, pageView;      CellContentView textView, pageView;
33            
34      public MultitypeCellContentView(      public MultitypeCellContentView(
# Line 38  public class MultitypeCellContentView im Line 38  public class MultitypeCellContentView im
38      }      }
39            
40      public void place(Cell c, VobScene sc, Box box,      public void place(Cell c, VobScene sc, Box box,
41                        ViewContext context, float scale) {                        ViewContext context) {
42          VStreamCellTexter tex = (VStreamCellTexter)c.space.getCellTexter();          VStreamCellTexter tex = (VStreamCellTexter)c.space.getCellTexter();
43          Enfilade1D enf = tex.getEnfilade(c, null);          Enfilade1D enf = tex.getEnfilade(c, null);
44          if(enf.length() == 0) return;          if(enf.length() == 0) return;
45          Object firstSpan = enf.getList().get(0);          Object firstSpan = enf.getList().get(0);
46          if(firstSpan instanceof PageSpan)          if(firstSpan instanceof PageSpan)
47              pageView.place(c, sc, box, context, scale);              pageView.place(c, sc, box, context);
48          else          else
49              textView.place(c, sc, box, context, scale);              textView.place(c, sc, box, context);
50      }      }
51  }  }

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