Package com.google.gwt.user.client

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


  @SuppressWarnings("unused")
  private static class FixedWidthGridImplOpera extends FixedWidthGridImpl {
    @Override
    public void setColumnWidth(FixedWidthGrid grid, int column, int width) {
      super.setColumnWidth(grid, column, width);
      Element tableElem = grid.getElement();
      Element parentElem = DOM.getParent(tableElem);
      int scrollLeft = 0;
      if (parentElem != null) {
        scrollLeft = DOM.getElementPropertyInt(parentElem, "scrollLeft");
      }
      DOM.setStyleAttribute(tableElem, "display", "none");
View Full Code Here


   * not selected, or doesn't exist (out of bounds).
   *
   * @param row the row index
   */
  public void deselectRow(int row) {
    Element rowElem = selectedRows.remove(new Integer(row));
    if (rowElem != null) {
      setStyleName(rowElem, "selected", false);
      if (tableSelectionListeners != null) {
        tableSelectionListeners.fireRowDeselected(this, row);
      }
View Full Code Here

   * @see com.google.gwt.widgetideas.table.client.overrides.HTMLTable
   */
  @Override
  public void onBrowserEvent(Event event) {
    super.onBrowserEvent(event);
    Element targetRow = null;
    Element targetCell = null;

    switch (DOM.eventGetType(event)) {
      // Hover the cell on mouse over
      case Event.ONMOUSEOVER:
        Element cellElem = getEventTargetCell(event);
        if (cellElem != null) {
          hoverCell(cellElem);
        }
        break;

      // Unhover on mouse out
      case Event.ONMOUSEOUT:
        Element toElem = DOM.eventGetToElement(event);
        if (hoveringRowElem != null
            && (toElem == null || !DOM.isOrHasChild(hoveringRowElem, toElem))) {
          // Check that the coordinates are not directly over the cell
          int clientX = DOM.eventGetClientX(event);
          int clientY = DOM.eventGetClientY(event);
View Full Code Here

    if (DOM.compare(cellElem, hoveringCellElem)) {
      return;
    }

    // Get the row element
    Element rowElem = null;
    if (cellElem != null) {
      rowElem = DOM.getParent(cellElem);
    }

    // Unhover the current cell
View Full Code Here

            cell.onClick(event);
          }
          break;
        }
        case Event.ONMOUSEOUT: {
          Element e = DOM.eventGetFromElement(event);
          if (e != null) {
            Cell cell = cellMap.get(e);
            if (cell != null) {
              cell.removeStyleName(Styles.HIGHLIGHTED_CELL);
              Element target = DOM.eventGetToElement(event);
              if (target != null && cellMap.get(target) == null) {
                updateHighlightedDate(null);
              }
            }
          }
          break;
        }
        case Event.ONMOUSEOVER: {
          Element e = DOM.eventGetToElement(event);
          if (e != null) {
            Cell cell = cellMap.get(e);
            if (cell != null) {
              cell.addStyleName(Styles.HIGHLIGHTED_CELL);
              cell.onHover();
View Full Code Here

      return cellList.size();
    }

    private Cell getCell(Event e) {
      // Find out which cell was actually clicked.
      Element td = getEventTargetCell(e);
      return td != null ? cellMap.get(td) : null;
    }
View Full Code Here

  /**
   * Creates an empty tree item.
   */
  public FastTreeItem() {
    Element elem = createLeafElement();
    setElement(elem);   
  }
View Full Code Here

   */
  public void becomeInteriorNode() { 
    if (!isInteriorNode()) {     
      state = TREE_NODE_INTERIOR_NEVER_OPENED;

      Element control = DOM.createDiv();
      setStyleName(control, STYLENAME_CLOSED);
      DOM.appendChild(control, contentElem);
      convertElementToInteriorNode(control);
    }
  }
View Full Code Here

    setStyleName(getElement(), "gwt-FastTreeItem-leaf", false);
    DOM.appendChild(getElement(), control);
  }

  Element createLeafElement() {
    Element elem = DOMHelper.clone(TREE_LEAF, true);
    contentElem = DOMHelper.rawFirstChild(elem);
    return elem;
  }
View Full Code Here

    DOM.setStyleAttribute(lineElement, "position", "absolute");
    DOM.setElementProperty(lineElement, "className", "gwt-SliderBar-line");

    // Create the knob
    images.slider().applyTo(knobImage);
    Element knobElement = knobImage.getElement();
    DOM.appendChild(getElement(), knobElement);
    DOM.setStyleAttribute(knobElement, "position", "absolute");
    DOM.setElementProperty(knobElement, "className", "gwt-SliderBar-knob");

    // Make this a resizable widget
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.