1 21 24 package org.lobobrowser.html.domimpl; 25 26 import org.lobobrowser.html.BrowserFrame; 27 import org.lobobrowser.html.js.*; 28 import org.w3c.dom.Document ; 29 import org.w3c.dom.html2.HTMLFrameElement; 30 31 public class HTMLFrameElementImpl extends HTMLElementImpl implements 32 HTMLFrameElement, FrameNode { 33 private volatile BrowserFrame browserFrame; 34 35 public HTMLFrameElementImpl(String name, boolean noStyleSheet) { 36 super(name, noStyleSheet); 37 } 38 39 public HTMLFrameElementImpl(String name) { 40 super(name); 41 } 42 43 public void setBrowserFrame(BrowserFrame frame) { 44 this.browserFrame = frame; 45 } 46 47 public BrowserFrame getBrowserFrame() { 48 return this.browserFrame; 49 } 50 51 public String getFrameBorder() { 52 return this.getAttribute("frameBorder"); 53 } 54 55 public void setFrameBorder(String frameBorder) { 56 this.setAttribute("frameBorder", frameBorder); 57 } 58 59 public String getLongDesc() { 60 return this.getAttribute("longdesc"); 61 } 62 63 public void setLongDesc(String longDesc) { 64 this.setAttribute("longdesc", longDesc); 65 } 66 67 public String getMarginHeight() { 68 return this.getAttribute("marginHeight"); 69 } 70 71 public void setMarginHeight(String marginHeight) { 72 this.setAttribute("marginHeight", marginHeight); 73 } 74 75 public String getMarginWidth() { 76 return this.getAttribute("marginWidth"); 77 } 78 79 public void setMarginWidth(String marginWidth) { 80 this.setAttribute("marginWidth", marginWidth); 81 } 82 83 public String getName() { 84 return this.getAttribute("name"); 85 } 86 87 public void setName(String name) { 88 this.setAttribute("name", name); 89 } 90 91 private boolean noResize; 92 93 public boolean getNoResize() { 94 return this.noResize; 95 } 96 97 public void setNoResize(boolean noResize) { 98 this.noResize = noResize; 99 } 100 101 public String getScrolling() { 102 return this.getAttribute("scrolling"); 103 } 104 105 public void setScrolling(String scrolling) { 106 this.setAttribute("scrolling", scrolling); 107 } 108 109 public String getSrc() { 110 return this.getAttribute("src"); 111 } 112 113 public void setSrc(String src) { 114 this.setAttribute("src", src); 115 } 116 117 public Document getContentDocument() { 118 BrowserFrame frame = this.browserFrame; 119 if(frame == null) { 120 return null; 122 } 123 return frame.getContentDocument(); 124 } 125 126 public Window getContentWindow() { 127 BrowserFrame frame = this.browserFrame; 128 if(frame == null) { 129 return null; 131 } 132 return Window.getWindow(frame.getHtmlRendererContext()); 133 } 134 135 } 136 | Popular Tags |