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

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


    if (profileRoot == null) {
      profileDiv.setHtml("Profile is empty.");
      return;
    }
    profileDiv.setHtml("");
    Container container = new DefaultContainerImpl(profileDiv.getElement());
    // show VM states (Garbage Collect, etc)
    StringBuilder result = new StringBuilder();
    result.append("<h3>VM States</h3>");
    result.append("<br/>");
    profile.getVmStateHtml(result);
    result.append("<br/>");
    DivElement vmStatesDiv = container.getDocument().createDivElement();
    vmStatesDiv.setInnerHTML(result.toString());
    profileDiv.getElement().appendChild(vmStatesDiv);

    profileDiv.setHtml(result.toString());
    switch (profileType) {
View Full Code Here


    // 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() {
View Full Code Here

  /**
   * Create a resource location as an anchor in the parent element.
   */
  private void renderResourceLocation(Element parent, final JsSymbol jsSymbol) {
    final Anchor anchor = new Anchor(new DefaultContainerImpl(parent));

    String resourceLocation = jsSymbol.getResourceUrl().getLastPathComponent();
    if (!jsSymbol.isNativeSymbol()) {
      resourceLocation = "".equals(resourceLocation) ? "" : resourceLocation
          + ":" + jsSymbol.getLineNumber();
View Full Code Here

          resizeCallback.onResize();
        }
      }

      private void initItem(JavaScriptProfileNode profileNode) {
        Container container = new DefaultContainerImpl(
            this.getItemLabelElement());
        DivElement topDiv = container.getDocument().createDivElement();
        topDiv.setClassName(css.treeItemTopDiv());
        this.getItemLabelElement().appendChild(topDiv);
        // The bottom div is reserved for the resymbolized link.
        bottomDiv = container.getDocument().createDivElement();
        bottomDiv.setClassName(css.treeItemBottomDiv());
        this.getItemLabelElement().appendChild(bottomDiv);

        final JsSymbol symbol = profileNode.getSymbol();
        SpanElement symbolNameElement = container.getDocument().createSpanElement();
        symbolNameElement.setInnerText(formatSymbolName(symbol));
        topDiv.appendChild(symbolNameElement);
        renderResourceLocation(topDiv, symbol);
        SpanElement timeValue = container.getDocument().createSpanElement();
        topDiv.appendChild(timeValue);
        timeValue.setInnerHTML(" <b>self: " + formatSelfTime(profileNode)
            + "%</b> (" + formatTime(profileNode) + "%)");
      }
View Full Code Here

  private class SeverityRow extends ReportRow {
    private final HintletReportRowDetails details;

    public SeverityRow(int severity, List<HintRecord> hintletRecords) {
      super(tree);
      Container rowContainer = new DefaultContainerImpl(getItemLabelElement());
      populateRowSummary(rowContainer, severity, hintletRecords);
      details = new HintletReportRowDetails(this, hintletRecords, reportModel);
    }
View Full Code Here

    Element elem = getElement();
    elem.setClassName(css.sluggishnessPanel());

    EventWaterfallFilter filter = new EventWaterfallFilter(
        TOP_LEVEL_FILTER_THRESHOLD);
    contentTable = new EventWaterfall(new DefaultContainerImpl(elem), filter,
        (SluggishnessVisualization) getVisualization(), sourceDispatcher,
        resources);

    // Add a mouse out listener to turn off the current event marker when
    // the cursor leaves the detail view.
View Full Code Here

     * @param ruleName name of the rule this table holds.
     * @param hintletRecords list of records to display.
     */
    public RuleRow(String ruleName, List<HintRecord> hintletRecords) {
      super(tree);
      Container rowContainer = new DefaultContainerImpl(getItemLabelElement());
      populateRowSummary(rowContainer, ruleName, hintletRecords);
      details = new RuleRowDetails(this, hintletRecords, reportModel);
    }
View Full Code Here

  }

  @Override
  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
    TableCellElement detailsTableCell = row.insertCell(-1);
    detailsTableCell.getStyle().setPropertyPx("paddingRight",
        getCss().uiPadding());

    // Attach the pie chart.
    detailsTableContainer = new DefaultContainerImpl(detailsTableCell);
    PieChart pieChart = createPieChart(detailsTableContainer);
    int pieChartHeight = pieChart.getElement().getOffsetHeight()
        + getCss().uiPadding();

    this.detailsTable = createDetailsTable(detailsTableContainer,
        pieChartHeight, getParentRow().getEvent());

    // Now we populate the first column.
    Container eventTraceContainer = new DefaultContainerImpl(
        eventTraceContainerCell);
    treeDiv = eventTraceContainer.getDocument().createDivElement();
    eventTraceContainerCell.appendChild(treeDiv);

    hintletTree = createHintletTree(treeDiv);
    createEventTrace(eventTraceContainer, pieChartHeight);
View Full Code Here

    }
  }

  private void buildProfileUi() {
    profileDiv.getElement().setInnerHTML("");
    Container container = new DefaultContainerImpl(profileDiv.getElement());
    HeadingElement profileHeading = container.getDocument().createHElement(3);
    profileDiv.getElement().appendChild(profileHeading);
    profileHeading.setInnerText("Profile");
    ScopeBar bar = new ScopeBar(container, resources);
    // TODO(jaimeyap): This will always return the most recent page we are
    // viewing. This is a bug. We should have ApplicationState know the current
View Full Code Here

    }

    JSOArray<HintRecord> hintlets = getParentRow().getEvent().getHintRecords();
    parent.setClassName(getCss().hintletList());

    HintletRecordsTree tree = new HintletRecordsTree(new DefaultContainerImpl(
        parent), hintlets, resources);

    // Hook listener to tree list to monitor expansion changes.
    tree.addExpansionChangeListener(new ExpansionChangeListener() {
View Full Code Here

TOP

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

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.