1 package org.lobobrowser.html.domimpl; 2 3 import org.w3c.dom.Document ; 4 import org.w3c.dom.html2.HTMLFormElement; 5 import org.w3c.dom.html2.HTMLObjectElement; 6 7 public class HTMLObjectElementImpl extends HTMLAbstractUIElement implements 8 HTMLObjectElement { 9 public HTMLObjectElementImpl(String name) { 10 super(name); 11 } 12 13 public String getAlign() { 14 return this.getAttribute("align"); 15 } 16 17 public String getAlt() { 18 return this.getAttribute("alt"); 19 } 20 21 public String getArchive() { 22 return this.getAttribute("archive"); 23 } 24 25 public String getCode() { 26 return this.getAttribute("code"); 27 } 28 29 public String getCodeBase() { 30 return this.getAttribute("codebase"); 31 } 32 33 public String getHeight() { 34 return this.getAttribute("height"); 35 } 36 37 public String getName() { 38 return this.getAttribute("name"); 39 } 40 41 public String getObject() { 42 return this.getAttribute("object"); 43 } 44 45 public String getWidth() { 46 return this.getAttribute("width"); 47 } 48 49 public void setAlign(String align) { 50 this.setAttribute("align", align); 51 } 52 53 public void setAlt(String alt) { 54 this.setAttribute("alt", alt); 55 } 56 57 public void setArchive(String archive) { 58 this.setAttribute("archive", archive); 59 } 60 61 public void setCode(String code) { 62 this.setAttribute("code", code); 63 } 64 65 public void setCodeBase(String codeBase) { 66 this.setAttribute("codebase", codeBase); 67 } 68 69 public void setHeight(String height) { 70 this.setAttribute("height", height); 71 } 72 73 public void setName(String name) { 74 this.setAttribute("name", name); 75 } 76 77 public void setObject(String object) { 78 this.setAttribute("object", object); 79 } 80 81 public void setWidth(String width) { 82 this.setAttribute("width", width); 83 } 84 85 public String getBorder() { 86 return this.getAttribute("border"); 87 } 88 89 public String getCodeType() { 90 return this.getAttribute("codetype"); 91 } 92 93 public Document getContentDocument() { 94 return this.getOwnerDocument(); 95 } 96 97 public String getData() { 98 return this.getAttribute("data"); 99 } 100 101 public boolean getDeclare() { 102 return "declare".equalsIgnoreCase(this.getAttribute("declare")); 103 } 104 105 public HTMLFormElement getForm() { 106 return (HTMLFormElement) this.getAncestorForJavaClass(HTMLFormElement.class); 107 } 108 109 public int getHspace() { 110 try { 111 return Integer.parseInt(this.getAttribute("hspace")); 112 } catch(Exception err) { 113 return 0; 114 } 115 } 116 117 public String getStandby() { 118 return this.getAttribute("standby"); 119 } 120 121 public int getTabIndex() { 122 try { 123 return Integer.parseInt(this.getAttribute("tabindex")); 124 } catch(Exception err) { 125 return 0; 126 } 127 } 128 129 public String getType() { 130 return this.getAttribute("type"); 131 } 132 133 public String getUseMap() { 134 return this.getAttribute("usemap"); 135 } 136 137 public int getVspace() { 138 try { 139 return Integer.parseInt(this.getAttribute("vspace")); 140 } catch(Exception err) { 141 return 0; 142 } 143 } 144 145 public void setBorder(String border) { 146 this.setAttribute("border", border); 147 } 148 149 public void setCodeType(String codeType) { 150 this.setAttribute("codetype", codeType); 151 } 152 153 public void setData(String data) { 154 this.setAttribute("data", data); 155 } 156 157 public void setDeclare(boolean declare) { 158 this.setAttribute("declare", declare ? "declare" : null); 159 } 160 161 public void setHspace(int hspace) { 162 this.setAttribute("hspace", String.valueOf(hspace)); 163 } 164 165 public void setStandby(String standby) { 166 this.setAttribute("standby", standby); 167 } 168 169 public void setTabIndex(int tabIndex) { 170 this.setAttribute("tabindex", String.valueOf(tabIndex)); 171 } 172 173 public void setType(String type) { 174 this.setAttribute("type", type); 175 } 176 177 public void setUseMap(String useMap) { 178 this.setAttribute("usemap", useMap); 179 } 180 181 public void setVspace(int vspace) { 182 this.setAttribute("vspace", String.valueOf(vspace)); 183 } 184 } 185 | Popular Tags |