Examples of cast()


Examples of com.google.gwt.dom.client.InputElement.cast()

    public void edit(Element cell, Record record, String value, DataType<String> type, final Callback<String> callback) {
        final InputElement input = InputElement.as(DOM.createElement("input"));
        input.setValue(value);
        input.getStyle().setWidth(100, Style.Unit.PCT);
        input.getStyle().setHeight(100, Style.Unit.PCT);
        EventUtils.addHandler(input.<Element>cast(), Event.ONKEYPRESS | Event.ONBLUR, new Handler<Event>() {
            public void handle(Event event) {
                if (event.getTypeInt() == Event.ONKEYPRESS && event.getKeyCode() != KeyCodes.KEY_ENTER) {
                    return;
                }
                String value = input.getValue();
View Full Code Here

Examples of com.google.gwt.dom.client.NativeEvent.cast()

          Element target = realEvent.getEventTarget().cast();
          if (!"body".equals(target.getTagName().toLowerCase())) {
            return;
          }
          // Test that the event is meaningful (and stop bubbling if it is not).
          SignalEvent signal = SignalEventImpl.create(realEvent.<Event>cast(), true);
          if (signal != null) {
            KeyCombo key = EventWrapper.getKeyCombo(signal);
            if (globalHandler.onKeySignal(key)) {
              event.preventDefault();
            }
View Full Code Here

Examples of com.google.gwt.dom.client.Node.cast()

      wrapperBeforeTextNodes = null;
      possibleOwnerNode = renderedContent.getFirstChild(parentElement);
    } else {
      // reached an element
      wrapperBeforeTextNodes = NodeManager.getBackReference(
          nodeletBeforeTextNodes.<Element>cast());
      possibleOwnerNode = renderedContent.getNextSibling(wrapperBeforeTextNodes);
    }

    // Scan to find a matching pair
    while (true) {
View Full Code Here

Examples of com.google.gwt.dom.client.SelectElement.cast()

   * @return the newly-created element
   */
  public static com.google.gwt.user.client.Element createSelect(boolean multiple) {
    SelectElement selectElement = Document.get().createSelectElement();
    selectElement.setMultiple(multiple);
    return selectElement.cast();
  }

  /**
   * Creates an HTML SPAN element.
   *
 
View Full Code Here

Examples of com.google.gwt.dom.client.TableCellElement.cast()

    if (data.getStyle() != null) {
      fly(td).applyStyles(data.getStyle());
    }
    getRow(curRow).dom.appendChild(td);
    return td.cast();
  }

  protected int[] getNextNonSpan(int colIndex, int rowIndex) {
    setupList(rowIndex);
    while ((colIndex >= columns)
View Full Code Here

Examples of com.google.gwt.dom.client.TableElement.cast()

            if (cloneNode.getTagName().toLowerCase().equals("tr")) {
                TableElement table = Document.get().createTableElement();
                TableSectionElement tbody = Document.get().createTBodyElement();
                table.appendChild(tbody);
                tbody.appendChild(cloneNode);
                cloneNode = table.cast();
            }
        }
        if (alignImageToEvent) {
            int absoluteTop = element.getAbsoluteTop();
            int absoluteLeft = element.getAbsoluteLeft();
View Full Code Here

Examples of com.google.gwt.dom.client.Text.cast()

    while(iterator.hasNext()) {
      Text styleText = iterator.next();
      styleTexts.add(styleText);
    }
    for (Text styleText : styleTexts) {
      styleText.<Text>cast().setData(styleText.<Text>cast().getData() + " ");
    }
   
      return svg;
  }
View Full Code Here

Examples of com.google.gwt.query.client.js.JsNodeArray.cast()

    assertEquals(1, a.keys().length);
    assertEquals(1, a.elements().length);

    JsNodeArray n = JsNodeArray.create();
    assertEquals(0, n.getLength());
    assertEquals(0, n.<JsCache>cast().keys().length);
    assertEquals(0, n.elements().length);

    n.addNode($("<hr/>").get(0));
    assertEquals(1, n.getLength());
    assertEquals(1, n.<JsCache>cast().keys().length);
View Full Code Here

Examples of com.google.gwt.user.client.Element.cast()

      // If no image element has been created yet, create one from the
      // prototype.
      DOM.appendChild(holder, proto.createElement().<Element> cast());
    } else {
      // Otherwise, simply apply the prototype to the existing element.
      proto.applyTo(child.<ImagePrototypeElement> cast());
    }
  }

  private void updateAriaAttributes() {
View Full Code Here

Examples of com.google.gwt.user.client.ui.AbstractImagePrototype.ImagePrototypeElement.cast()

        El.fly(i).setStyleAttribute("cursor", "default");
        El.fly(i).setStyleAttribute("float", "left");
        if (altIconText != null || GXT.isAriaEnabled()) {
          i.setAttribute("alt", altIconText != null ? altIconText : "Panel Icon");
        }
        el().insertChild((Element) i.cast(), 0);
      }
    }
    this.icon = icon;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.