Package com.google.gwt.user.client

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


  public FixedWidthGrid() {
    super();
    setClearText(" ");

    // Setup the table element
    Element tableElem = getElement();
    DOM.setStyleAttribute(tableElem, "tableLayout", "fixed");
    DOM.setStyleAttribute(tableElem, "width", "0px");

    // Replace the formatters
    setRowFormatter(new FixedWidthGridRowFormatter());
View Full Code Here


    int columnWidth = getColumnWidth(column);
    int widthOffset = -1 * columnWidth;
    int contentVisibleWidth = 0;
    FixedWidthGridCellFormatter formatter = getFixedWidthGridCellFormatter();
    for (int row = 0; row < numRows; row++) {
      Element td = formatter.getRawElement(row, column);

      // Get the visible width for all cells in the column
      if (row == 0) {
        int clientWidth = DOM.getElementPropertyInt(td, "clientWidth");
        contentVisibleWidth = clientWidth - 2 * getCellPadding();
 
View Full Code Here

    // Specifically allow the row count as an insert position.
    if (beforeRow != getRowCount()) {
      checkRowBounds(beforeRow);
    }
    Element tr = DOM.createTR();
    DOM.insertChild(getBodyElement(), tr, beforeRow + 1);
    numRows++;

    // Add cells to the row
    for (int column = 0; column < numColumns; column++) {
View Full Code Here

  /**
   * @see com.google.gwt.widgetideas.table.client.overrides.HTMLTable
   */
  @Override
  protected Element insertCell(int row, int column) {
    Element tr = getRowFormatter().getElement(row);
    Element td = createCell();
    appendCellContainer(td);
    DOM.insertChild(tr, td, column);
    return td;
  }
View Full Code Here

  protected void updateGhostRow() {
    int numGhosts = getGhostColumnCount();
    if (numColumns > numGhosts) {
      // Add ghosts as needed
      for (int i = numGhosts; i < numColumns; i++) {
        Element td = OverrideDOM.createTD();
        DOM.setStyleAttribute(td, "height", "0px");
        DOM.setStyleAttribute(td, "overflow", "hidden");
        DOM.setStyleAttribute(td, "paddingTop", "0px");
        DOM.setStyleAttribute(td, "paddingBottom", "0px");
        DOM.setStyleAttribute(td, "borderTop", "0px");
        DOM.setStyleAttribute(td, "borderBottom", "0px");
        DOM.setStyleAttribute(td, "margin", "0px");
        DOM.appendChild(ghostRow, td);
        setColumnWidth(i, getColumnWidth(i));
      }
    } else if (numColumns < numGhosts) {
      int cellsToRemove = numGhosts - numColumns;
      for (int i = 0; i < cellsToRemove; i++) {
        Element td = getGhostCellElement(numColumns);
        DOM.removeChild(ghostRow, td);
      }
    }
  }
View Full Code Here

   * @see SortableGrid#applySort(Element[])
   */
  @Override
  void applySort(Element[] trElems) {
    // Move the rows to their new positions
    Element bodyElem = getBodyElement();
    for (int i = trElems.length - 1; i >= 0; i--) {
      if (trElems[i] != null) {
        DOM.removeChild(bodyElem, trElems[i]);
        // Need to insert below the ghost row
        DOM.insertChild(bodyElem, trElems[i], 1);
View Full Code Here

    // Set the enforced cell style
    DOM.setInnerHTML(td, "");
    DOM.setStyleAttribute(td, "overflow", "hidden");

    // Add a tight span to hold the contents
    Element span = DOM.createSpan();
    DOM.setStyleAttribute(span, "padding", "0px");
    DOM.setInnerHTML(span, "&nbsp;");
    DOM.appendChild(td, span);
  }
View Full Code Here

   *          automatically hidden when the user clicks on it or presses
   *          <code>ESC</code>.
   */
  public GlassPanel(boolean autoHide) {
    this.autoHide = autoHide;
    Element elem = getElement();
    DOM.setStyleAttribute(elem, "backgroundColor", "#000");
    DOM.setStyleAttribute(elem, "filter", "alpha(opacity=50)");
    DOM.setStyleAttribute(elem, "opacity", "0.5");
    setStyleName("gwt-GlassPanel");
  }
View Full Code Here

     * Create the ghost row.
     *
     * @return the ghost row element
     */
    public Element createGhostRow() {
      Element ghostRow = DOM.createTR();
      DOM.setStyleAttribute(ghostRow, "margin", "0px");
      DOM.setStyleAttribute(ghostRow, "padding", "0px");
      DOM.setStyleAttribute(ghostRow, "height", "0px");
      DOM.setStyleAttribute(ghostRow, "overflow", "hidden");
      return ghostRow;
View Full Code Here

   */
  @SuppressWarnings("unused")
  private static class FixedWidthGridImplIE6 extends FixedWidthGridImpl {
    @Override
    public Element createGhostRow() {
      Element ghostRow = super.createGhostRow();
      DOM.setStyleAttribute(ghostRow, "display", "none");
      return ghostRow;
    }
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.