Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.IFrameElement


            this.show();
        }
    }

    private Element getExternalFrameElement(String id) {
        IFrameElement iframe = IFrameElement.as( this.externalFrame.getElement() );
        return iframe.getContentDocument().getElementById( id );
    }
View Full Code Here


            this.show();
        }
    }

    private Element getExternalFrameElement( String id ) {
        IFrameElement iframe = IFrameElement.as( this.externalFrame.getElement() );
        return iframe.getContentDocument().getElementById( id );
    }
View Full Code Here

        gadgetIframe.addStyleName(CSS.loadingGadgetLargeThrobber());
        height = Resources.RESOURCES.loadingGadgetLarge().getHeight();
        break;
    }
   
    IFrameElement iframe = getIframeElement();
    iframe.setAttribute("vspace", "0");
    iframe.setAttribute("hspace", "0");
    iframe.setAttribute("frameBorder", "no");
    iframe.setAttribute("moduleId", gadgetName);
    iframe.setAttribute("display", "block");
    iframe.setAttribute("height", height + "px");
    // TODO(user): scrolling policy/settings for the wave gadgets.
    iframe.setScrolling("no");

    //remove default style
    gadgetIframe.removeStyleName("gwt-Frame");
    gadgetIframe.addStyleName(CSS.gadgetIframe());
View Full Code Here

  public static CajolerFacade instance() {
    return instance;
  }

  private static CajolerFacade create() {
    IFrameElement cajaFrame = createCajaFrame();
    CajoleService service = new HttpCajoleService();
    return new CajolerFacade(service, cajaFrame);
  }
View Full Code Here

    CajoleService service = new HttpCajoleService();
    return new CajolerFacade(service, cajaFrame);
  }

  private static IFrameElement createCajaFrame() {
    IFrameElement cajaFrame = Document.get().createIFrameElement();
    cajaFrame.setFrameBorder(0);
    cajaFrame.setAttribute("width", "0");
    cajaFrame.setAttribute("height", "0");
    Document.get().getBody().appendChild(cajaFrame);
    Document cajaFrameDoc = cajaFrame.getContentDocument();
    cajaFrameDoc.getBody().appendChild(
        cajaFrameDoc.createScriptElement(RESOURCES.supportingJs().getText()));
    cajaFrameDoc.getBody().appendChild(
        cajaFrameDoc.createScriptElement(RESOURCES.taming().getText()));
    return cajaFrame;
View Full Code Here

  private static void prepareHistoryFrame()
  {
    if (!historyFrameInitialized)
    {
      Element body = RootPanel.getBodyElement();
      IFrameElement historyFrame = DOM.createIFrame().cast();
      historyFrame.setSrc("javascript:''");
      historyFrame.setId("__gwt_historyFrame");
      historyFrame.getStyle().setProperty("position", "absolute");
      historyFrame.getStyle().setProperty("width", "0");
      historyFrame.getStyle().setProperty("height", "0");
      historyFrame.getStyle().setProperty("border", "0");
      body.appendChild(historyFrame);
        History.fireCurrentHistoryState();
        historyFrameInitialized = true;
    }
  }
View Full Code Here

     * Get html
     *
     * @return
     */
    public String getInnerHTML() {
        IFrameElement frameElement = IFrameElement.as(currentFrame.getElement());
        Document document = frameElement.getContentDocument();
        BodyElement ele = document.getBody();
        if (ele != null) {
            return ele.getInnerHTML();
        }

View Full Code Here

     * Compare version
     */
    public void displayHighLigth() {
        contentService.getHighlighted(getInnerHTML(), getCompareWith(), new BaseAsyncCallback<String>() {
            public void onSuccess(String s) {
                IFrameElement frameElement = IFrameElement.as(currentFrame.getElement());
                Document document = frameElement.getContentDocument();
                BodyElement ele = document.getBody();
                if (ele != null) {
                    ele.setInnerHTML(s);
                }
            }
View Full Code Here

 
  public IFrameXmlLoader() {
  }

  public void loadResource(String resourceName, AsyncXmlLoaderCallback callback) {
    IFrameElement iframe = Document.get().createIFrameElement();
    iframe.setAttribute("tabIndex", "-1");
    iframe.setAttribute("style", "position: absolute; width: 0; height: 0; border: 0");
    iframe.setAttribute("src", "javascript:''");
    Element body = RootPanel.get().getElement();
    body.appendChild(iframe);
    setFrameLocation(resourceName, iframe, callback);
  }
View Full Code Here

    setFrameLocation(resourceName, iframe, callback);
  }
 
  @SuppressWarnings("unused")
  private void dispatch(NativeEvent event, AsyncXmlLoaderCallback callback) {
    IFrameElement iframe = event.getCurrentEventTarget().cast();
    if (iframe != null) {
      String href = getHref(iframe);
      if (!"about:blank".equals(href)) {
        Element root = iframe.getContentDocument().getDocumentElement();
        Element localRoot = DOMHelper.importNode(DOMHelper.getCurrentDocument(), root, true).cast();
        callback.onSuccess(href, localRoot);
      }
      Element body = RootPanel.get().getElement();
      body.removeChild(iframe);
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.IFrameElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.