Package com.google.gwt.dom.client

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


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

        // it may happens if the iframe is not yet loaded
View Full Code Here


     */
    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 DOMHelperImplIE() {
    // Inject the xpath.js script in the iframe document (not
    // in the main document, otherwise the added code will not be
    // seen by the GWT code which lives in the iframe document)
    Document doc = getIFrameDocument();
    ScriptElement scriptElem = doc.createScriptElement(Resource.INSTANCE.xpath().getText());
    doc.getBody().appendChild(scriptElem);
    initXPath();
  }
View Full Code Here

     * which is not used with any <code>OMDocument</code> yet, this is
     * <code>null</code>.
     * @return The <code>OMDocument</code> object associated with this node.
     */
  public final OMDocument getOwnerDocument() {
    Document document = ot.getOwnerDocument();
    return (document != null) ? (OMDocument)convert(document) : null;
  }
View Full Code Here

    boolean alreadyLoaded = nativeCreateCallback();
    alreadyInjected = true;
    if (alreadyLoaded) {
      return true;
    }
    Document doc = Document.get();
    String key = (apiKey == null) ? "" : ("key=" + apiKey + "&");
    String src = getProtocol() + "//www.google.com/jsapi?" + key
        + "callback=__gwt_AjaxLoader_onLoad";
    ScriptElement script = doc.createScriptElement();
    script.setSrc(src);
    script.setType("text/javascript");
    doc.getBody().appendChild(script);
    return false;
  }
View Full Code Here

          decimalPlaces(2).
          suffix(" (EUR)"));
      Window.alert("numbers formated: "+formated+"    -   "+formated2);
     
      String xml1 = "<p>aslkdjas<h>alskd</h></p>";
      Document doc1 = Y.DataTypeXML().parse(xml1);
      Window.alert("first tag is : "+
        doc1.getDocumentElement().getTagName()+
        "\nxml formatted is: \n"+
        Y.DataTypeXML().format(doc1));
    }
  });  
}
View Full Code Here

    private final DivElement taskStatusElement;

    private final DivElement errorStatusElement;

    public StatusView() {
      final Document document = Document.get();
      final Element element = getElement();
      taskStatusElement = element.appendChild(document.createDivElement());
      errorStatusElement = element.appendChild(document.createDivElement());
      errorStatusElement.setInnerText("No response from server");

      setStyleName("status-view");
      taskStatusElement.setClassName("status-view-task");
      errorStatusElement.setClassName("status-view-error");
View Full Code Here

    /**
     *
     */
    public EditView() {
      final Document document = Document.get();
      final Element element = getElement();

      final Element rowElement = element.appendChild(document
          .createDivElement());
      rowElement.setClassName("surface-item-edit");

      titleTextBox = new TextBox();
      titleTextBox.setStyleName("surface-item-title");
      add(titleTextBox, rowElement.<com.google.gwt.user.client.Element> cast());
      titleTextBox.addBlurHandler(this);
      titleTextBox.addKeyPressHandler(this);

      final Element authorsElement = rowElement.appendChild(document
          .createDivElement());
      authorsElement.setClassName("surface-item-authors");
      authorsElement.setInnerText("/w Only You.");

      SurfaceListView.this.add(this, listElement
View Full Code Here

     * @param surface
     *          the surface to be displayed
     */
    public ItemView(Surface surface) {
      this.surface = surface;
      final Document document = Document.get();
      final Element element = getElement();
      final Element rowElement = element.appendChild(document
          .createDivElement());
      titleElement = rowElement.appendChild(document.createSpanElement());
      noteCountElement = rowElement.appendChild(document.createSpanElement());
      authorsElement = rowElement.appendChild(document.createDivElement());

      rowElement.setClassName("surface-item" + getNextStyleNameSuffix());
      titleElement.setClassName("surface-item-title");
      noteCountElement.setClassName("surface-item-count");
      authorsElement.setClassName("surface-item-authors");
View Full Code Here

     * which is not used with any <code>OMDocument</code> yet, this is
     * <code>null</code>.
     * @return The <code>OMDocument</code> object associated with this node.
     */
  public final OMDocument getOwnerDocument() {
    Document document = ot.getOwnerDocument();
    return (document != null) ? (OMDocument)convert(document) : null;
  }
View Full Code Here

TOP

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

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.