1 14 package org.wings.template; 15 16 import org.wings.SComponent; 17 import org.wings.STemplateLayout; 18 import org.wings.io.Device; 19 import org.wings.io.DeviceOutputStream; 20 import org.wings.template.parser.ParseContext; 21 22 import java.io.OutputStream ; 23 24 28 public final class TemplateParseContext implements ParseContext { 29 private final OutputStream myOut; 30 private final Device sink; 31 private final STemplateLayout layout; 32 33 public TemplateParseContext(final Device sink, STemplateLayout layout) { 34 this.sink = sink; 35 this.layout = layout; 36 myOut = new DeviceOutputStream(sink); 37 } 38 39 public OutputStream getOutputStream() { 40 return myOut; 41 } 42 43 public void startTag(int number) { 44 } 45 46 public void doneTag(int number) { 47 } 48 49 52 public Device getDevice() { 53 return sink; 54 } 55 56 public SComponent getComponent(String name) { 57 return layout.getComponent(name); 58 } 59 } 60 61 62 | Popular Tags |