1 58 package org.apache.ecs.wml; 59 60 import org.apache.ecs.*; 61 62 68 public class Img extends SinglePartElement 69 { 70 71 74 { 75 setBeginEndModifier('/'); 76 setElementType("img"); 77 } 78 79 80 83 public Img() 84 { 85 } 86 87 91 public Img(String src) 92 { 93 setSrc(src); 94 } 95 96 101 public Img(String src, String alt) 102 { 103 setSrc(src); 104 setAlt(alt); 105 } 106 107 111 public Img setSrc(String src) 112 { 113 addAttribute("src",src); 114 return this; 115 } 116 117 121 public Img setAlt(String alt) 122 { 123 addAttribute("alt",alt); 124 return this; 125 } 126 127 131 public Img setLocalsrc(String localsrc) 132 { 133 addAttribute("localsrc",localsrc); 134 return this; 135 } 136 137 141 public Img setVspace(String vspace) 142 { 143 addAttribute("vspace",vspace); 144 return this; 145 } 146 147 151 public Img setHspace(String hspace) 152 { 153 addAttribute("hspace",hspace); 154 return this; 155 } 156 157 161 public Img setAlignment(Alignment align) 162 { 163 addAttribute("align",align.toString()); 164 return this; 165 } 166 167 171 public Img setHeight(String height) 172 { 173 addAttribute("height",height); 174 return this; 175 } 176 177 181 public Img setWidth(String width) 182 { 183 addAttribute("width",width); 184 return this; 185 } 186 } 187 | Popular Tags |