3 |
package org.fenfire.view; |
package org.fenfire.view; |
4 |
import org.fenfire.*; |
import org.fenfire.*; |
5 |
import org.nongnu.libvob.*; |
import org.nongnu.libvob.*; |
6 |
|
import org.nongnu.libvob.gl.*; |
7 |
import org.nongnu.libvob.util.CachingMap; |
import org.nongnu.libvob.util.CachingMap; |
8 |
|
|
9 |
import org.nongnu.alph.*; |
import org.nongnu.alph.*; |
10 |
import java.awt.Color; |
import java.awt.Color; |
11 |
import com.hp.hpl.mesa.rdf.jena.model.*; |
import com.hp.hpl.mesa.rdf.jena.model.*; |
12 |
|
|
13 |
public abstract class PageHandler implements ContentHandler { // , PageState { //, PageContext |
public abstract class PageHandler implements ContentHandler, PageContext { // , PageState |
14 |
|
|
15 |
CachingMap map = new CachingMap(50); |
public PageHandler() { |
16 |
private PageSpanLayout getPageSpanLayout(Enfilade1D enf) { |
setFrameVisible(true); |
|
PageSpanLayout res = (PageSpanLayout)map.get(enf); |
|
|
if(res == null) { |
|
|
res = new PageSpanLayout(enf); |
|
|
map.put(enf, res); |
|
|
} |
|
|
return res; |
|
17 |
} |
} |
18 |
|
|
19 |
public void place(VobScene vs, int box, Enfilade1D enf) { |
public void place(VobScene vs, int box, Enfilade1D enf) { |
20 |
getPageSpanLayout(enf).place(vs, box, 1, 1); |
throw new Error("Not implemented"); |
21 |
} |
} |
22 |
public void getSize(Enfilade1D enf, float[] size) { |
public void getSize(Enfilade1D enf, float[] size) { |
23 |
PageSpanLayout l = getPageSpanLayout(enf); |
throw new Error("Not implemented"); |
|
size[0] = l.w; |
|
|
size[1] = l.h; |
|
24 |
} |
} |
25 |
|
|
26 |
|
protected boolean visibleFrame; |
27 |
|
public boolean frameVisible() { return visibleFrame; } |
28 |
|
public void setFrameVisible(boolean b) { visibleFrame = b; } |
29 |
} |
} |