Example usage for com.google.gwt.dom.client IFrameElement getId

List of usage examples for com.google.gwt.dom.client IFrameElement getId

Introduction

In this page you can find the example usage for com.google.gwt.dom.client IFrameElement getId.

Prototype

@Override
    public String getId() 

Source Link

Usage

From source file:org.sakaiproject.sgs2.client.Sgs2.java

License:Educational Community License

private void configureSakaiParentIframe(int setHeight) {

    // Resize parent Sakai iframe
    Document doc = getWindowParentDocument();
    NodeList<Element> nodeList = doc.getElementsByTagName("iframe");
    for (int i = 0; i < nodeList.getLength(); i++) {
        IFrameElement iframe = (IFrameElement) nodeList.getItem(i);
        if (iframe.getId().startsWith("Main")) {
            iframe.setAttribute("height", setHeight + "px");
            iframe.setAttribute("style", "height: " + setHeight + "px;");
            // IE Fix
            iframe.getStyle().setPropertyPx("height", setHeight);
            break;
        }/*from  w w  w. ja va 2 s .  c o  m*/
    }
}