1 58 package org.apache.ecs.xhtml; 59 60 import org.apache.ecs.*; 61 62 69 public class font extends MultiPartElement implements Printable 70 { 71 72 75 { 76 setElementType("font"); 77 setCase(LOWERCASE); 78 setAttributeQuote(true); 79 } 80 81 84 public font() 85 { 86 } 87 88 92 public font(String face) 93 { 94 setFace(face); 95 } 96 97 103 public font(String face,String color) 104 { 105 setFace(face); 106 setColor(color); 107 } 108 109 116 public font(String face,String color,int size) 117 { 118 setFace(face); 119 setColor(color); 120 setSize(size); 121 } 122 123 128 public font(int size) 129 { 130 setSize(size); 131 } 132 133 139 public font(int size,String face) 140 { 141 setSize(size); 142 setFace(face); 143 } 144 145 151 public font(String color,int size) 152 { 153 setSize(size); 154 setColor(color); 155 } 156 157 161 public font setFace(String face) 162 { 163 addAttribute("face",face); 164 return(this); 165 } 166 167 171 public font setColor(String color) 172 { 173 addAttribute("color",HtmlColor.convertColor(color)); 174 return(this); 175 } 176 177 181 public font setSize(int size) 182 { 183 addAttribute("size",Integer.toString(size)); 184 return(this); 185 } 186 187 191 public font setSize(String size) 192 { 193 addAttribute("size",size); 194 return(this); 195 } 196 197 201 public Element setLang(String lang) 202 { 203 addAttribute("lang",lang); 204 addAttribute("xml:lang",lang); 205 return this; 206 } 207 208 213 public font addElement(String hashcode,Element element) 214 { 215 addElementToRegistry(hashcode,element); 216 return(this); 217 } 218 219 224 public font addElement(String hashcode,String element) 225 { 226 addElementToRegistry(hashcode,element); 227 return(this); 228 } 229 230 234 public font addElement(Element element) 235 { 236 addElementToRegistry(element); 237 return(this); 238 } 239 240 244 public font addElement(String element) 245 { 246 addElementToRegistry(element); 247 return(this); 248 } 249 253 public font removeElement(String hashcode) 254 { 255 removeElementFromRegistry(hashcode); 256 return(this); 257 } 258 } 259 | Popular Tags |