Package com.google.gwt.dom.client

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


            // Style style = widgetDIV.getStyle();
            // FF2 chokes on some floats very easily. Measuring size escpecially
            // becomes terribly slow
            TableElement tableEl = Document.get().createTableElement();
            tableEl.setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>");
            DivElement div = (DivElement) tableEl.getFirstChildElement()
                    .getFirstChildElement().getFirstChildElement()
                    .getFirstChildElement();
            tableEl.setCellPadding(0);
            tableEl.setCellSpacing(0);
            tableEl.setBorder(0);
            div.getStyle().setProperty("padding", "0");

            setElement(tableEl);
            containerDIV = div;
        } else {
            setFloat(widgetDIV, "left");
View Full Code Here


        // Find width consumed by tabs
        TableCellElement spacerCell = ((TableElement) tb.getElement().cast())
                .getRows().getItem(0).getCells().getItem(tb.getTabCount());

        int spacerWidth = spacerCell.getOffsetWidth();
        DivElement div = (DivElement) spacerCell.getFirstChildElement();

        int spacerMinWidth = spacerCell.getOffsetWidth() - div.getOffsetWidth();

        int tabsWidth = tb.getOffsetWidth() - spacerWidth + spacerMinWidth;

        // Find content width
        Style style = tp.getElement().getStyle();
View Full Code Here

            // FF2 chokes on some floats very easily. Measuring size escpecially
            // becomes terribly slow
            TableElement tableEl = Document.get().createTableElement();
            tableEl
                    .setInnerHTML("<tbody><tr><td><div></div></td></tr></tbody>");
            DivElement div = (DivElement) tableEl.getFirstChildElement()
                    .getFirstChildElement().getFirstChildElement()
                    .getFirstChildElement();
            tableEl.setCellPadding(0);
            tableEl.setCellSpacing(0);
            tableEl.setBorder(0);
            div.getStyle().setProperty("padding", "0");

            setElement(tableEl);
            containerDIV = div;
        } else {
            setFloat(widgetDIV, "left");
View Full Code Here

        // Find width consumed by tabs
        TableCellElement spacerCell = ((TableElement) tb.getElement().cast())
                .getRows().getItem(0).getCells().getItem(tb.getTabCount());

        int spacerWidth = spacerCell.getOffsetWidth();
        DivElement div = (DivElement) spacerCell.getFirstChildElement();

        int spacerMinWidth = spacerCell.getOffsetWidth() - div.getOffsetWidth();

        int tabsWidth = tb.getOffsetWidth() - spacerWidth + spacerMinWidth;

        // Find content width
        Style style = tp.getElement().getStyle();
View Full Code Here

            {
                event.preventDefault();
                makeVisible(false);
            }
        });
        DivElement iconDiv = Document.get().createDivElement();
        iconDiv.setClassName("spiffy-longmessage-panel-hide");
        iconDiv.setId(id + "_longMsg_hide_IconDiv");    
       
        m_close.getElement().appendChild(iconDiv);
        div.add(m_close);
        add(div);
View Full Code Here

    headerElem.getStyle().setPropertyPx("width", Constants.GRAPH_HEADER_WIDTH);
    ImageResource icon = getIconFromFileType(fileType);

    textElem = DocumentExt.get().createDivWithClassName(css.headerText());

    DivElement path = DocumentExt.get().createDivElement();
    // Strip query params from lastPathComponent.
    String[] lastPathComponent = resource.getLastPathComponent().split("\\?");

    path.setInnerText(lastPathComponent[0]);
    DivElement url = DocumentExt.get().createDivWithClassName(css.url());
    url.setInnerText(resource.getUrl());

    textElem.appendChild(path);
    textElem.appendChild(url);

    headerElem.appendChild(ImageResourceElementCreator.createElementFrom(icon));
    headerElem.appendChild(textElem);

    headerElem.setAttribute("title", resource.getUrl());
    elem.appendChild(headerElem);

    final DivElement indicatorElem = DocumentExt.get().createDivElement();
    indicatorElem.setClassName(css.indicators());
    headerElem.appendChild(indicatorElem);

    indicatorContainer = new DefaultContainerImpl(indicatorElem);

    // Adds a hintlet indicator if the record has associated hintlets.
View Full Code Here

        new ServerEventController.HasTraceCallback() {
          public void onResponse(boolean hasTrace) {
            if (!hasTrace) {
              return;
            }
            final DivElement indicatorElem = DocumentExt.get().createDivWithClassName(
                resources.resourceRowCss().serverTraceIndicator());
            indicatorElem.setTitle("Includes timing data from the server.");
            indicatorContainer.getElement().appendChild(indicatorElem);
          }
        });
  }
View Full Code Here

    private final SpanElement labelElem;

    public ListEntry(TableRowElement row, ColorCodedValue entryData) {
      this.entryData = entryData;

      DivElement colorElem = Document.get().createDivElement();
      colorElem.setClassName(resources.colorListCss().entryColor());
      colorElem.getStyle().setProperty("backgroundColor",
          entryData.labelColor.toString());
      labelElem = Document.get().createSpanElement();
      labelElem.setClassName(resources.colorListCss().label());

      TableCellElement cell = row.insertCell(-1);
View Full Code Here

    return link;
  }

  private static Element createSectionHeader(Css css, Document document,
      String text) {
    final DivElement header = document.createDivElement();
    header.setClassName(css.sectionHeader());
    header.setInnerHTML(text);
    return header;
  }
View Full Code Here

    if (applicationUrl == null && endPointUrl == null && traceViewUrl == null) {
      return;
    }

    final Document document = parent.getOwnerDocument();
    final DivElement element = document.createDivElement();
    element.setClassName(css.springInsightViews());
    element.setInnerText("Spring Insight Views: ");

    element.appendChild(document.createTextNode("("));

    // Add Trace URL
    if (traceViewUrl != null) {
      element.appendChild(createNewTabLink(document, css.springInsightLink(),
          traceViewUrl, "Trace"));
    }

    // Add EndPoint URL
    if (endPointUrl != null) {
      // Is there a previous item?
      if (traceViewUrl != null) {
        element.appendChild(document.createTextNode(", "));
      }
      element.appendChild(createNewTabLink(document, css.springInsightLink(),
          endPointUrl, "EndPoint"));
    }

    // Add Application URL
    if (applicationUrl != null) {
      // Is there a previous item?
      if (traceViewUrl != null || endPointUrl != null) {
        element.appendChild(document.createTextNode(", "));
      }
      element.appendChild(createNewTabLink(document, css.springInsightLink(),
          applicationUrl, "Application"));
    }

    element.appendChild(document.createTextNode(") "));
    parent.appendChild(element);
  }
View Full Code Here

TOP

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

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.