26 |
* Written by Benja Fallenstein |
* Written by Benja Fallenstein |
27 |
*/ |
*/ |
28 |
package org.fenfire.view; |
package org.fenfire.view; |
29 |
|
import org.fenfire.spanimages.*; |
30 |
import org.fenfire.swamp.*; |
import org.fenfire.swamp.*; |
31 |
import org.nongnu.alph.*; |
import org.nongnu.alph.*; |
32 |
import org.nongnu.libvob.*; |
import org.nongnu.libvob.*; |
38 |
public class PageNodeView implements NodeFunction { |
public class PageNodeView implements NodeFunction { |
39 |
|
|
40 |
final NodeFunction nodeContent; |
final NodeFunction nodeContent; |
41 |
|
final SpanImageFactory spanImageFactory; |
42 |
|
|
43 |
public PageNodeView(NodeFunction nodeContent) { |
public PageNodeView(NodeFunction nodeContent, |
44 |
|
SpanImageFactory spanImageFactory) { |
45 |
this.nodeContent = nodeContent; |
this.nodeContent = nodeContent; |
46 |
|
this.spanImageFactory = spanImageFactory; |
47 |
} |
} |
48 |
|
|
49 |
public Object f(ConstGraph g, Object node) { |
public Object f(ConstGraph g, Object node) { |
50 |
Enfilade1D enf = (Enfilade1D)nodeContent.f(g, node); |
Enfilade1D enf = (Enfilade1D)nodeContent.f(g, node); |
51 |
return new PageSpanLayout(enf); |
return new PageSpanLayout(enf, spanImageFactory); |
52 |
} |
} |
53 |
} |
} |