Java Code Examples for com.google.gwt.dom.client.IFrameElement#setAttribute()

The following examples show how to use com.google.gwt.dom.client.IFrameElement#setAttribute() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CajolerFacade.java    From swellrt with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 2
Source File: GadgetWidgetUi.java    From swellrt with Apache License 2.0 5 votes vote down vote up
private void buildIFrame(String gadgetName) {
  gadgetIframe.getElement().setId(gadgetName);
  
  int height = 0;
  switch (throbberState) {
    case SMALL:
      gadgetIframe.addStyleName(CSS.loadingGadgetSmallThrobber());
      height = Resources.RESOURCES.loadingGadgetSmall().getHeight();
      break;
    case LARGE:
      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());

  iframeDiv.add(gadgetIframe);
}
 
Example 3
Source File: CajolerFacade.java    From incubator-retired-wave with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 4
Source File: GadgetWidgetUi.java    From incubator-retired-wave with Apache License 2.0 5 votes vote down vote up
private void buildIFrame(String gadgetName) {
  gadgetIframe.getElement().setId(gadgetName);
  
  int height = 0;
  switch (throbberState) {
    case SMALL:
      gadgetIframe.addStyleName(CSS.loadingGadgetSmallThrobber());
      height = Resources.RESOURCES.loadingGadgetSmall().getHeight();
      break;
    case LARGE:
      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());

  iframeDiv.add(gadgetIframe);
}