1 24 25 package org.enhydra.xml.xhtml.dom.xerces; 26 27 import org.w3c.dom.Node ; 28 import org.w3c.dom.html.HTMLTableCellElement; 29 import org.w3c.dom.html.HTMLTableRowElement; 30 31 public class XHTMLTableCellElementImpl 32 extends XHTMLElementImpl 33 implements org.enhydra.xml.xhtml.dom.XHTMLTableCellElement 34 { 35 36 public XHTMLTableCellElementImpl (XHTMLDocumentBase owner, String namespaceURI, String tagName) { 37 super( owner, namespaceURI, tagName); 38 } 39 40 public void setId (String newValue) { 41 setAttribute("id", newValue); 42 } 43 44 public String getId () { 45 return getAttribute ("id"); 46 } 47 public void setLang (String newValue) { 48 setAttribute("lang", newValue); 49 } 50 51 public String getLang () { 52 return getAttribute ("lang"); 53 } 54 public void setDir (String newValue) { 55 setAttribute("dir", newValue); 56 } 57 58 public String getDir () { 59 return getAttribute ("dir"); 60 } 61 public void setClassName (String newValue) { 62 setAttribute("class", newValue); 63 } 64 65 public String getClassName () { 66 return getAttribute ("class"); 67 } 68 public void setTitle (String newValue) { 69 setAttribute("title", newValue); 70 } 71 72 public String getTitle () { 73 return getAttribute ("title"); 74 } 75 public void setAlign (String newValue) { 76 setAttribute("align", newValue); 77 } 78 79 public String getAlign () { 80 return getAttribute ("align"); 81 } 82 public void setHeight (String newValue) { 83 setAttribute("height", newValue); 84 } 85 86 public String getHeight () { 87 return getAttribute ("height"); 88 } 89 public void setWidth (String newValue) { 90 setAttribute("width", newValue); 91 } 92 93 public String getWidth () { 94 return getAttribute ("width"); 95 } 96 public void setBgColor (String newValue) { 97 setAttribute("bgcolor", newValue); 98 } 99 100 public String getBgColor () { 101 return getAttribute ("bgcolor"); 102 } 103 public void setAbbr (String newValue) { 104 setAttribute("abbr", newValue); 105 } 106 107 public String getAbbr () { 108 return getAttribute ("abbr"); 109 } 110 public void setAxis (String newValue) { 111 setAttribute("axis", newValue); 112 } 113 114 public String getAxis () { 115 return getAttribute ("axis"); 116 } 117 public void setColSpan (int newValue) { 118 setAttribute("colspan", newValue); 119 } 120 121 public int getColSpan () { 122 return getIntAttribute ("colspan"); 123 } 124 public void setHeaders (String newValue) { 125 setAttribute("headers", newValue); 126 } 127 128 public String getHeaders () { 129 return getAttribute ("headers"); 130 } 131 public void setNoWrap (boolean newValue) { 132 setAttribute("nowrap", newValue); 133 } 134 135 public boolean getNoWrap () { 136 return getBooleanAttribute("nowrap"); 137 } 138 public void setRowSpan (int newValue) { 139 setAttribute("rowspan", newValue); 140 } 141 142 public int getRowSpan () { 143 return getIntAttribute ("rowspan"); 144 } 145 public void setScope (String newValue) { 146 setAttribute("scope", newValue); 147 } 148 149 public String getScope () { 150 return getAttribute ("scope"); 151 } 152 public void setVAlign (String newValue) { 153 setAttribute("valign", newValue); 154 } 155 156 public String getVAlign () { 157 return getAttribute ("valign"); 158 } 159 public void setOnKeyUp (String newValue) { 160 setAttribute("onkeyup", newValue); 161 } 162 163 public String getOnKeyUp () { 164 return getAttribute ("onkeyup"); 165 } 166 public void setStyle (String newValue) { 167 setAttribute("style", newValue); 168 } 169 170 public String getStyle () { 171 return getAttribute ("style"); 172 } 173 public void setOnMouseDown (String newValue) { 174 setAttribute("onmousedown", newValue); 175 } 176 177 public String getOnMouseDown () { 178 return getAttribute ("onmousedown"); 179 } 180 public void setOnKeyPress (String newValue) { 181 setAttribute("onkeypress", newValue); 182 } 183 184 public String getOnKeyPress () { 185 return getAttribute ("onkeypress"); 186 } 187 public void setOnDblClick (String newValue) { 188 setAttribute("ondblclick", newValue); 189 } 190 191 public String getOnDblClick () { 192 return getAttribute ("ondblclick"); 193 } 194 public void setOnKeyDown (String newValue) { 195 setAttribute("onkeydown", newValue); 196 } 197 198 public String getOnKeyDown () { 199 return getAttribute ("onkeydown"); 200 } 201 public void setOnMouseMove (String newValue) { 202 setAttribute("onmousemove", newValue); 203 } 204 205 public String getOnMouseMove () { 206 return getAttribute ("onmousemove"); 207 } 208 public void setOnMouseUp (String newValue) { 209 setAttribute("onmouseup", newValue); 210 } 211 212 public String getOnMouseUp () { 213 return getAttribute ("onmouseup"); 214 } 215 public void setXmlLang (String newValue) { 216 setAttribute("xml:lang", newValue); 217 } 218 219 public String getXmlLang () { 220 return getAttribute ("xml:lang"); 221 } 222 public void setOnMouseOut (String newValue) { 223 setAttribute("onmouseout", newValue); 224 } 225 226 public String getOnMouseOut () { 227 return getAttribute ("onmouseout"); 228 } 229 public void setOnClick (String newValue) { 230 setAttribute("onclick", newValue); 231 } 232 233 public String getOnClick () { 234 return getAttribute ("onclick"); 235 } 236 public void setOnMouseOver (String newValue) { 237 setAttribute("onmouseover", newValue); 238 } 239 240 public String getOnMouseOver () { 241 return getAttribute ("onmouseover"); 242 } 243 public void setChOff (String newValue) { 244 setAttribute("charoff", newValue); 245 } 246 247 public String getChOff () { 248 return getAttribute ("charoff"); 249 } 250 251 public int getCellIndex() { 252 Node parent; 253 Node child; 254 int index; 255 256 parent = getParentNode(); 257 index = 0; 258 if ( parent instanceof HTMLTableRowElement ) 259 { 260 child = parent.getFirstChild(); 261 while ( child != null ) 262 { 263 if ( child instanceof HTMLTableCellElement ) 264 { 265 if ( child == this ) 266 return index; 267 ++ index; 268 } 269 child = child.getNextSibling(); 270 } 271 } 272 return -1; 273 } 274 275 276 public void setCellIndex( int cellIndex ) { 277 Node parent; 278 Node child; 279 int index; 280 281 parent = getParentNode(); 282 if ( parent instanceof HTMLTableRowElement ) 283 { 284 child = parent.getFirstChild(); 285 while ( child != null ) 286 { 287 if ( child instanceof HTMLTableCellElement ) 288 { 289 if ( cellIndex == 0 ) 290 { 291 if ( this != child ) 292 parent.insertBefore( this, child ); 293 return; 294 } 295 -- cellIndex; 296 } 297 child = child.getNextSibling(); 298 } 299 } 300 parent.appendChild( this ); 301 } 302 303 public String getCh() { 304 String ch; 305 306 ch = getAttribute( "char" ); 308 if ( ch != null && ch.length() > 1 ) 309 ch = ch.substring( 0, 1 ); 310 return ch; 311 } 312 313 314 public void setCh( String ch ) { 315 if ( ch != null && ch.length() > 1 ) 317 ch = ch.substring( 0, 1 ); 318 setAttribute( "char", ch ); 319 } 320 } 321 322 323 | Popular Tags |