1 18 package org.apache.beehive.netui.tags.rendering; 19 20 import org.apache.beehive.netui.tags.html.HtmlConstants; 21 22 import java.util.HashMap ; 23 24 28 public abstract class THeadTag 29 extends TagHtmlBase 30 { 31 public static void add(HashMap html, HashMap htmlQuirks, HashMap xhtml) 32 { 33 html.put(THEAD_TAG, new THeadTag.Rendering()); 34 htmlQuirks.put(THEAD_TAG, new THeadTag.Rendering()); 35 xhtml.put(THEAD_TAG, new THeadTag.Rendering()); 36 } 37 38 public static class State extends AbstractHtmlState 39 { 40 public void clear() 41 { 42 super.clear(); 43 } 44 } 45 46 private static class Rendering 47 extends THeadTag implements HtmlConstants 48 { 49 public void doStartTag(AbstractRenderAppender sb, AbstractTagState renderState) 50 { 51 assert(sb != null) : "Parameter 'sb' must not be null"; 52 assert(renderState != null) : "Parameter 'renderState' must not be null"; 53 assert(renderState instanceof State) : "Paramater 'renderState' must be an instance of THeadTag.State"; 54 55 State state = (State) renderState; 56 57 renderTag(sb, THEAD); 58 59 renderAttribute(sb, ID, state.id); 60 renderAttribute(sb, CLASS, state.styleClass); 61 62 renderAttributes(AbstractHtmlState.ATTR_GENERAL, sb, state); 63 renderAttribute(sb, STYLE, state.style); 64 renderAttributes(AbstractHtmlState.ATTR_JAVASCRIPT, sb, state); 65 sb.append(">"); 66 } 67 68 public void doEndTag(AbstractRenderAppender sb) 69 { 70 renderEndTag(sb, THEAD); 71 } 72 } 73 } 74 | Popular Tags |