01: /* AuxheaderDefault.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Wed Oct 24 11:49:32 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zkmax.zul.render;
20:
21: import java.io.IOException;
22: import java.io.Writer;
23:
24: import org.zkoss.zk.ui.Component;
25: import org.zkoss.zk.ui.render.ComponentRenderer;
26: import org.zkoss.zk.ui.render.SmartWriter;
27: import org.zkoss.zk.ui.render.Out;
28:
29: import org.zkoss.zul.Auxheader;
30:
31: /**
32: * {@link Auxheader}'s default mold.
33: *
34: * @author tomyeh
35: * @since 3.0.0
36: */
37: public class AuxheaderDefault implements ComponentRenderer {
38:
39: public void render(Component comp, Writer out) throws IOException {
40: final SmartWriter wh = new SmartWriter(out);
41: final Auxheader self = (Auxheader) comp;
42: wh.write("<th id=\"").write(self.getUuid()).write('"').write(
43: self.getOuterAttrs()).write(self.getInnerAttrs())
44: .write("><div id=\"").write(self.getUuid()).write(
45: "!cave\" class=\"head-cell-inner\">").write(
46: self.getImgTag());
47: new Out(self.getLabel()).render(out);
48: wh.writeChildren(self).writeln("</div></th>");
49: }
50: }
|