Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Element


          return;
        }
        if (!CollapsiblePanel.this.collapseToggle.isDown()) {
          switch (DOM.eventGetType(event)) {
            case Event.ONMOUSEOUT:
              Element to = DOM.eventGetToElement(event);
              if (to == null && state == State.SHOWING) {
                // Linux hosted mode hack.
                return;
              }
              if (to != null && DOM.isOrHasChild(master.getElement(), to)) {
View Full Code Here


    Button buttonHTMLDefault = new Button("HTML setSize(\"\", \"\")");
    buttonHTMLDefault.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        removeGlassPanel();
        Element htmlElement = DOM.getParent(RootPanel.getBodyElement());
        DOM.setStyleAttribute(htmlElement, "width", "");
        DOM.setStyleAttribute(htmlElement, "height", "");
        resetGlassPanels();
      }
    });

    Button buttonHTMLLarge = new Button("HTML setSize(\"2000px\", \"2000px\")");
    buttonHTMLLarge.addClickListener(new ClickListener() {
      public void onClick(Widget sender) {
        removeGlassPanel();
        Element htmlElement = DOM.getParent(RootPanel.getBodyElement());
        DOM.setStyleAttribute(htmlElement, "width", "2000px");
        DOM.setStyleAttribute(htmlElement, "height", "2000px");
        resetGlassPanels();
      }
    });
View Full Code Here

    @Override
    public void localOnRendered() {
      // We're saving an extra object creation by calling super rather than
      // chaining them.
      super.localOnRendered();
      Element newGhostRow = getBulkLoadedGhostRow(getTable());

      // Set the ghost row to point at correct location
      ((FixedWidthGrid) getTable()).setGhostRow(newGhostRow);
      if (userCallback != null) {
        userCallback.onRendered();
View Full Code Here

* TODO: incorporate into DOMImplSafari
*/
class OverrideDOMImplSafari extends OverrideDOMImpl {
  @Override
  public Element createTD() {
    Element td = super.createTD();
    DOM.setElementPropertyInt(td, "colSpan", 1);
    DOM.setElementPropertyInt(td, "rowSpan", 1);
    return td;
  }
View Full Code Here

    return td;
  }

  @Override
  public Element createTH() {
    Element th = super.createTH();
    DOM.setElementPropertyInt(th, "colSpan", 1);
    DOM.setElementPropertyInt(th, "rowSpan", 1);
    return th;
  }
View Full Code Here

   * of cells.
   */
  public void clearAll() {
    for (int row = 0; row < getRowCount(); row++) {
      for (int col = 0; col < getCellCount(row); col++) {
        Element td = cellFormatter.getRawElement(row, col);
        internalClearCell(td, true);
      }
    }
  }
View Full Code Here

   * @param column the widget's column
   * @return true if a widget was removed
   * @throws IndexOutOfBoundsException
   */
  public boolean clearCell(int row, int column) {
    Element td = getCellFormatter().getElement(row, column);
    return internalClearCell(td, true);
  }
View Full Code Here

   * @param event the event to be queried
   * @return the TD associated with the event, or <code>null</code> if none is
   *         found.
   */
  public Element getEventTargetCell(Event event) {
    Element td = DOM.eventGetTarget(event);
    for (; td != null; td = DOM.getParent(td)) {
      // If it's a TD, it might be the one we're looking for.
      if (DOM.getElementProperty(td, "tagName").equalsIgnoreCase("td")) {
        // Make sure it's directly a part of this table before returning
        // it.
        Element tr = DOM.getParent(td);
        Element body = DOM.getParent(tr);
        if (DOM.compare(body, bodyElem)) {
          return td;
        }
      }
      // If we run into this table's body, we're out of options.
View Full Code Here

   * @param event the event to be queried
   * @return the TR associated with the event, or <code>null</code> if none is
   *         found.
   */
  public Element getEventTargetRow(Event event) {
    Element tr = DOM.eventGetTarget(event);
    for (; tr != null; tr = DOM.getParent(tr)) {
      // If it's a TD, it might be the one we're looking for.
      if (DOM.getElementProperty(tr, "tagName").equalsIgnoreCase("tr")) {
        // Make sure it's directly a part of this table before returning
        // it.
        Element body = DOM.getParent(tr);
        if (DOM.compare(body, bodyElem)) {
          return tr;
        }
      }
      // If we run into this table's body, we're out of options.
View Full Code Here

  public void onBrowserEvent(Event event) {
    switch (DOM.eventGetType(event)) {
      case Event.ONCLICK: {
        if (tableListeners != null) {
          // Find out which cell was actually clicked.
          Element td = getEventTargetCell(event);
          if (td == null) {
            return;
          }
          Element tr = DOM.getParent(td);
          int row = getRowIndex(tr);
          int column = DOM.getChildIndex(tr, td);
          // Fire the event.
          tableListeners.fireCellClicked(this, row, column);
        }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Element

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.