1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 68 public class BaseFont extends SinglePartElement implements Printable 69 { 70 71 74 { 75 setElementType("basefont"); 76 } 77 78 81 public BaseFont() 82 { 83 } 84 85 89 public BaseFont(String face) 90 { 91 setFace(face); 92 } 93 94 100 public BaseFont(String face,String color) 101 { 102 setFace(face); 103 setColor(color); 104 } 105 106 113 public BaseFont(String face,String color,int size) 114 { 115 setFace(face); 116 setColor(color); 117 setSize(size); 118 } 119 120 125 public BaseFont(int size,String face) 126 { 127 setSize(size); 128 setFace(face); 129 } 130 131 137 public BaseFont(String color,int size) 138 { 139 setSize(size); 140 setColor(color); 141 } 142 143 147 public BaseFont setFace(String face) 148 { 149 addAttribute("face",face); 150 return(this); 151 } 152 153 157 public BaseFont setColor(String color) 158 { 159 addAttribute("color",HtmlColor.convertColor(color)); 160 return(this); 161 } 162 163 167 public BaseFont setSize(int size) 168 { 169 addAttribute("size",Integer.toString(size)); 170 return(this); 171 } 172 173 177 public BaseFont setSize(String size) 178 { 179 addAttribute("size",size); 180 return(this); 181 } 182 183 188 public BaseFont addElement(String hashcode,Element element) 189 { 190 addElementToRegistry(hashcode,element); 191 return(this); 192 } 193 194 199 public BaseFont addElement(String hashcode,String element) 200 { 201 addElementToRegistry(hashcode,element); 202 return(this); 203 } 204 205 209 public BaseFont addElement(Element element) 210 { 211 addElementToRegistry(element); 212 return(this); 213 } 214 215 219 public BaseFont addElement(String element) 220 { 221 addElementToRegistry(element); 222 return(this); 223 } 224 228 public BaseFont removeElement(String hashcode) 229 { 230 removeElementFromRegistry(hashcode); 231 return(this); 232 } 233 } 234 | Popular Tags |