1 24 25 package org.enhydra.xml.xhtml.dom.xerces; 26 27 import org.w3c.dom.Node ; 28 import org.w3c.dom.Text ; 29 30 public class XHTMLScriptElementImpl 31 extends XHTMLElementImpl 32 implements org.enhydra.xml.xhtml.dom.XHTMLScriptElement 33 { 34 35 public XHTMLScriptElementImpl (XHTMLDocumentBase owner, String namespaceURI, String tagName) { 36 super( owner, namespaceURI, tagName); 37 } 38 39 public void setId (String newValue) { 40 setAttribute("id", newValue); 41 } 42 43 public String getId () { 44 return getAttribute ("id"); 45 } 46 public void setLang (String newValue) { 47 setAttribute("lang", newValue); 48 } 49 50 public String getLang () { 51 return getAttribute ("lang"); 52 } 53 public void setDir (String newValue) { 54 setAttribute("dir", newValue); 55 } 56 57 public String getDir () { 58 return getAttribute ("dir"); 59 } 60 public void setClassName (String newValue) { 61 setAttribute("class", newValue); 62 } 63 64 public String getClassName () { 65 return getAttribute ("class"); 66 } 67 public void setTitle (String newValue) { 68 setAttribute("title", newValue); 69 } 70 71 public String getTitle () { 72 return getAttribute ("title"); 73 } 74 public void setType (String newValue) { 75 setAttribute("type", newValue); 76 } 77 78 public String getType () { 79 return getAttribute ("type"); 80 } 81 public void setCharset (String newValue) { 82 setAttribute("charset", newValue); 83 } 84 85 public String getCharset () { 86 return getAttribute ("charset"); 87 } 88 public void setSrc (String newValue) { 89 setAttribute("src", newValue); 90 } 91 92 public String getSrc () { 93 return getAttribute ("src"); 94 } 95 public void setHtmlFor (String newValue) { 96 setAttribute("htmlfor", newValue); 97 } 98 99 public String getHtmlFor () { 100 return getAttribute ("htmlfor"); 101 } 102 public void setEvent (String newValue) { 103 setAttribute("event", newValue); 104 } 105 106 public String getEvent () { 107 return getAttribute ("event"); 108 } 109 public void setDefer (boolean newValue) { 110 setAttribute("defer", newValue); 111 } 112 113 public boolean getDefer () { 114 return getBooleanAttribute("defer"); 115 } 116 public void setLanguage (String newValue) { 117 setAttribute("language", newValue); 118 } 119 120 public String getLanguage () { 121 return getAttribute ("language"); 122 } 123 124 125 public String getText() { 126 Node child; 127 String text; 128 129 child = getFirstChild(); 132 text = ""; 133 while ( child != null ) 134 { 135 if ( child instanceof Text ) 136 text = text + ( (Text ) child ).getData(); 137 child = child.getNextSibling(); 138 } 139 return text; 140 } 141 142 143 public void setText( String text ) { 144 Node child; 145 Node next; 146 147 child = getFirstChild(); 150 while ( child != null ) 151 { 152 next = child.getNextSibling(); 153 removeChild( child ); 154 child = next; 155 } 156 insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() ); 157 } 158 159 160 ; 161 } 162 163 164 | Popular Tags |