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( |
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 |
} |
} |