1 20 21 22 package org.ozoneDB.xml.dom.html; 23 24 25 import org.ozoneDB.xml.dom.DOMExceptionImpl; 26 import org.ozoneDB.xml.dom.ElementImpl; 27 import org.w3c.dom.DOMException ; 28 import org.w3c.dom.Document ; 29 import org.w3c.dom.html.HTMLObjectElement; 30 31 32 38 public final class HTMLObjectElementImpl extends HTMLElementImpl implements HTMLObjectElement, HTMLFormControl { 39 40 41 public String getCode() { 42 return getAttribute( "code" ); 43 } 44 45 46 public void setCode( String code ) { 47 setAttribute( "code", code ); 48 } 49 50 51 public String getAlign() { 52 return capitalize( getAttribute( "align" ) ); 53 } 54 55 56 public void setAlign( String align ) { 57 setAttribute( "align", align ); 58 } 59 60 61 public String getArchive() { 62 return getAttribute( "archive" ); 63 } 64 65 66 public void setArchive( String archive ) { 67 setAttribute( "archive", archive ); 68 } 69 70 71 public String getBorder() { 72 return getAttribute( "border" ); 73 } 74 75 76 public void setBorder( String border ) { 77 setAttribute( "border", border ); 78 } 79 80 81 public String getCodeBase() { 82 return getAttribute( "codebase" ); 83 } 84 85 86 public void setCodeBase( String codeBase ) { 87 setAttribute( "codebase", codeBase ); 88 } 89 90 91 public String getCodeType() { 92 return getAttribute( "codetype" ); 93 } 94 95 96 public void setCodeType( String codeType ) { 97 setAttribute( "codetype", codeType ); 98 } 99 100 101 public String getData() { 102 return getAttribute( "data" ); 103 } 104 105 106 public void setData( String data ) { 107 setAttribute( "data", data ); 108 } 109 110 111 public boolean getDeclare() { 112 return getAttribute( "declare" ) != null; 113 } 114 115 116 public void setDeclare( boolean declare ) { 117 setAttribute( "declare", declare ? "" : null ); 118 } 119 120 121 public String getHeight() { 122 return getAttribute( "height" ); 123 } 124 125 126 public void setHeight( String height ) { 127 setAttribute( "height", height ); 128 } 129 130 131 public String getHspace() { 132 return getAttribute( "hspace" ); 133 } 134 135 136 public void setHspace( String hspace ) { 137 setAttribute( "hspace", hspace ); 138 } 139 140 141 public String getName() { 142 return getAttribute( "name" ); 143 } 144 145 146 public void setName( String name ) { 147 setAttribute( "name", name ); 148 } 149 150 151 public String getStandby() { 152 return getAttribute( "standby" ); 153 } 154 155 156 public void setStandby( String standby ) { 157 setAttribute( "standby", standby ); 158 } 159 160 161 public int getTabIndex() { 162 try { 163 return Integer.parseInt( getAttribute( "tabindex" ) ); 164 } catch (NumberFormatException except) { 165 return 0; 166 } 167 } 168 169 170 public void setTabIndex( int tabIndex ) { 171 setAttribute( "tabindex", String.valueOf( tabIndex ) ); 172 } 173 174 175 public String getType() { 176 return getAttribute( "type" ); 177 } 178 179 180 public void setType( String type ) { 181 setAttribute( "type", type ); 182 } 183 184 185 public String getUseMap() { 186 return getAttribute( "useMap" ); 187 } 188 189 190 public void setUseMap( String useMap ) { 191 setAttribute( "useMap", useMap ); 192 } 193 194 195 public String getVspace() { 196 return getAttribute( "vspace" ); 197 } 198 199 200 public void setVspace( String vspace ) { 201 setAttribute( "vspace", vspace ); 202 } 203 204 205 public String getWidth() { 206 return getAttribute( "width" ); 207 } 208 209 210 public void setWidth( String width ) { 211 setAttribute( "width", width ); 212 } 213 214 219 public Document getContentDocument() { 220 throw new DOMExceptionImpl( DOMException.NOT_SUPPORTED_ERR, 221 "HTMLObjectElementImpl.getContentDocument(): ozone's persistent DOM doesn't support DOM level 2 yet." ); 222 } 223 224 225 230 public HTMLObjectElementImpl( HTMLDocumentImpl owner, String name ) { 231 super( owner, "OBJECT" ); 232 } 233 234 235 } 236 | Popular Tags |