1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 70 public class style extends MultiPartElement implements Printable 71 { 72 73 public static final String css = "text/css"; 74 75 78 { 79 setElementType("style"); 80 setCase(LOWERCASE); 81 setAttributeQuote(true); 82 } 83 86 public style() 87 { 88 } 89 90 94 public style(String type) 95 { 96 setType(type); 97 } 98 99 104 public style(String type, Element element) 105 { 106 setType(type); 107 addElement(element); 108 } 109 110 115 public style(String type, String element) 116 { 117 setType(type); 118 addElement(element); 119 } 120 121 125 public style setType(String type) 126 { 127 addAttribute("type",type); 128 return this; 129 } 130 131 135 public style setMedia(String media) 136 { 137 addAttribute("media",media); 138 return this; 139 } 140 141 145 public Element setLang(String lang) 146 { 147 addAttribute("lang",lang); 148 addAttribute("xml:lang",lang); 149 return this; 150 } 151 152 157 public style addElement(String hashcode,Element element) 158 { 159 addElementToRegistry(hashcode,element); 160 return(this); 161 } 162 163 168 public style addElement(String hashcode,String element) 169 { 170 addElementToRegistry(hashcode,element); 171 return(this); 172 } 173 174 178 public style addElement(Element element) 179 { 180 addElementToRegistry(element); 181 return(this); 182 } 183 184 188 public style addElement(String element) 189 { 190 addElementToRegistry(element); 191 return(this); 192 } 193 197 public style removeElement(String hashcode) 198 { 199 removeElementFromRegistry(hashcode); 200 return(this); 201 } 202 } 203 | Popular Tags |