Package com.google.gwt.topspin.ui.client

Examples of com.google.gwt.topspin.ui.client.Table


      super(parent);
      final HintletReport.Css css = getResources().hintletReportCss();
      this.hintletRecords = hintletRecords;
      this.reportModel = reportModel;
      this.setExpandIconVisible(false);
      subTable = new Table(new DefaultContainerImpl(this.getItemLabelElement()));
      subTable.setStyleName(css.reportRowDetailTable());
      headerRowElem = subTable.appendRow();
      String className = this.getContentElement().getClassName();
      this.getContentElement().setClassName(
          css.reportRowDetailContentElem() + " " + className);
View Full Code Here


    header.setInnerHTML(text);
    return header;
  }

  private static Table createTable(Container container, String classname) {
    final Table table = new Table(container);
    table.getElement().setClassName(classname);
    return table;
  }
View Full Code Here

    final List<JavaScriptProfileNode> children = profileRoot.getChildren();
    if (children == null) {
      return;
    }
    Collections.sort(children, JavaScriptProfileModel.nodeTimeComparator);
    final Table profileTable = new Table(container);
    int rowIndex = 0;
    profileTable.appendRow();
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Symbol</b>");
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Resource</b>");
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Self Time</b>");
    profileTable.appendCell(rowIndex).setInnerHTML("<b>Time</b>");

    for (int length = children.size(); rowIndex < length; ++rowIndex) {
      JavaScriptProfileNode child = children.get(rowIndex);
      // Truncate the display by default to show only nodes where self time
      // occurred.
      if (child.getSelfTime() <= 0 && (length - rowIndex > 4)
          || rowIndex > FLAT_PROFILE_PAGE_SIZE) {
        break;
      }
      addFlatChild(child, profileTable);
    }

    // Profile terminated early, add a "show more" indicator
    if (rowIndex < children.size()) {
      profileTable.appendRow();
      TableCellElement cell = profileTable.appendCell(rowIndex + 1);
      cell.setColSpan(4);
      Anchor anchor = new Anchor(new DefaultContainerImpl(cell));
      anchor.setText("More...");
      anchor.setHref("javascript:;");
      cell.appendChild(anchor.getElement());
      final int moreRowIndex = rowIndex;
      listenerManager.manageEventListener(anchor.addClickListener(new ClickListener() {

        public void onClick(ClickEvent event) {
          profileTable.deleteRow(moreRowIndex + 1);
          for (int i = moreRowIndex; i < children.size(); ++i) {
            JavaScriptProfileNode child = children.get(i);
            addFlatChild(child, profileTable);
          }
          if (resizeCallback != null) {
View Full Code Here

  protected Element createElement() {
    Element elem = super.createElement();
    Container myContainer = new DefaultContainerImpl(elem);

    // Now we need to layout the rest of the row details
    Table detailsLayout = new Table(myContainer);
    detailsLayout.setFixedLayout(true);
    detailsLayout.getElement().setClassName(getCss().detailsLayout());

    // We have a 1 row, 2 column layout
    TableRowElement row = detailsLayout.insertRow(-1);

    // Create the first column.
    eventTraceContainerCell = row.insertCell(-1);

    // Add the piechart and detailsTable to the second column
View Full Code Here

   * @return The {@link Table} that contains the detail information
   */
  private Table createDetailsTable(Container parent, int pieChartHeight,
      final UiEvent e) {
    IterableFastStringMap<CellRenderer> detailsMap = getDetailsMapForEvent(e);
    final Table table = new Table(parent);

    detailsMap.iterate(new IterableFastStringMap.IterationCallBack<CellRenderer>() {
      private boolean hasRow = false;

      public void onIteration(String key, CellRenderer cellRenderer) {
        // If we have at least one piece of data for this table, we add a
        // header
        if (!hasRow) {
          // Establish column widths.
          Element keyCol = Document.get().createElement("th");
          keyCol.setClassName(getCss().detailsKeyColumn());
          Element valCol = Document.get().createElement("th");
          table.getTableHead().appendChild(keyCol);
          table.getTableHead().appendChild(valCol);

          // Now add the title
          Element titleRow = Document.get().createElement("tr");
          Element title = Document.get().createElement("th");
          title.setAttribute("colspan", "2");
          title.setAttribute("align", "left");
          title.setInnerText("Details for "
              + UiEvent.typeToDetailedTypeString(e));
          title.getStyle().setWidth(100, Unit.PX);
          titleRow.appendChild(title);
          table.getTableHead().appendChild(titleRow);
          hasRow = true;
        }

        TableRowElement row = table.appendRow();
        TableCellElement cell = row.insertCell(-1);
        cell.setClassName(getCss().detailsTableKey());
        String rowKey = key.substring(1);
        cell.setInnerText(rowKey);
        cell = row.insertCell(-1);
        cellRenderer.render(cell);
      }
    });

    table.addStyleName(getCss().detailsTable());
    // ensure that the table is positioned below the pieChart
    table.getElement().getStyle().setPropertyPx("marginTop", pieChartHeight);
    return table;
  }
View Full Code Here

    return tree;
  }

  private Table createMultiNodeDetailsTable(Container parent,
      int pieChartHeight, ArrayList<Item> selectedNodes) {
    Table table = new Table(parent);
    table.setFixedLayout(true);
    table.addStyleName(getCss().detailsTable());

    // Assume that List is sorted.
    UiEvent earliest = (UiEvent) selectedNodes.get(0).getItemTarget();
    UiEvent latest = (UiEvent) selectedNodes.get(selectedNodes.size() - 1).getItemTarget();
    double delta = latest.getTime() - earliest.getTime();

    TableRowElement row = table.appendRow();
    TableCellElement cell = row.insertCell(-1);
    cell.setClassName(getCss().detailsTableKey());
    cell.setInnerText("Time Delta");
    cell = row.insertCell(-1);
    cell.setInnerText(TimeStampFormatter.formatMilliseconds(delta));

    // ensure that the table is positioned below the pieChart
    table.getElement().getStyle().setPropertyPx("marginTop", pieChartHeight);
    return table;
  }
View Full Code Here

    updateSummaryTitle();
    summaryInfoDiv.getElement().appendChild(summaryTitle);

    // Summary info is a 2 column section. PieChart on the left, and the startup
    // statistics on the right.
    Table summaryLayout = new Table(summaryInfoContainer);
    summaryLayout.setFixedLayout(true);
    TableRowElement row = summaryLayout.insertRow(-1);
    row.setVAlign("top");
    TableCellElement leftCell = row.insertCell(-1);
    Container pieChartContainer = new DefaultContainerImpl(leftCell);

    // Create a piechart with no data initially.
View Full Code Here

TOP

Related Classes of com.google.gwt.topspin.ui.client.Table

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.