01: /* TabboxDefaultV.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Sep 6, 2007 7:08:15 PM , Created by robbiecheng
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.zul.Tabbox;
28: import org.zkoss.zul.Tabs;
29:
30: /**
31: * {@link Tabbox}'s default mold.
32: *
33: * @author robbiecheng
34: *
35: * @since 3.0.0
36: */
37: public class TabboxDefaultV implements ComponentRenderer {
38: public void render(Component comp, Writer out) throws IOException {
39: final SmartWriter wh = new SmartWriter(out);
40: final Tabbox self = (Tabbox) comp;
41: final Tabs tabs = self.getTabs();
42:
43: wh
44: .write("<div id=\"")
45: .write(self.getUuid())
46: .write('"')
47: .write(self.getOuterAttrs())
48: .write(self.getInnerAttrs())
49: .writeln(
50: " z.type=\"zul.tab.Tabbox\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">");
51:
52: wh.write("<tr valign=\"top\">").write(tabs).write(
53: self.getTabpanels()).writeln("</tr>").write(
54: "</table></div>");
55: }
56: }
|