1 58 package org.apache.ecs.html; 59 60 import org.apache.ecs.*; 61 62 69 public class Style extends MultiPartElement implements Printable 70 { 71 72 public static final String CSS = "text/css"; 73 74 public static final String css = "text/css"; 75 76 79 { 80 setElementType("style"); 81 } 82 85 public Style() 86 { 87 } 88 89 93 public Style(String type) 94 { 95 setType(type); 96 } 97 98 103 public Style(String type, Element element) 104 { 105 setType(type); 106 addElement(element); 107 } 108 109 114 public Style(String type, String element) 115 { 116 setType(type); 117 addElement(element); 118 } 119 120 124 public Style setType(String type) 125 { 126 addAttribute("type",type); 127 return this; 128 } 129 130 134 public Style setMedia(String media) 135 { 136 addAttribute("media",media); 137 return this; 138 } 139 140 145 public Style addElement(String hashcode,Element element) 146 { 147 addElementToRegistry(hashcode,element); 148 return(this); 149 } 150 151 156 public Style addElement(String hashcode,String element) 157 { 158 addElementToRegistry(hashcode,element); 159 return(this); 160 } 161 162 166 public Style addElement(Element element) 167 { 168 addElementToRegistry(element); 169 return(this); 170 } 171 172 176 public Style addElement(String element) 177 { 178 addElementToRegistry(element); 179 return(this); 180 } 181 185 public Style removeElement(String hashcode) 186 { 187 removeElementFromRegistry(hashcode); 188 return(this); 189 } 190 } 191 | Popular Tags |