Package com.google.gwt.user.client.ui.HTMLTable

Examples of com.google.gwt.user.client.ui.HTMLTable.RowFormatter


            formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT);
        } else {
            formatter.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_RIGHT);
        }

        RowFormatter rowFormatter = topPanel.getRowFormatter();

        // Align the content to the top
        rowFormatter.setVerticalAlign(0,
            HasVerticalAlignment.ALIGN_TOP);
        rowFormatter.setVerticalAlign(1,
            HasVerticalAlignment.ALIGN_TOP);
    }
View Full Code Here


    table.setWidth(cm.getTotalWidth() + "px");

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows += 1;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, "x-grid3-hd-row");
      rf.getElement(i).setAttribute("role", "presentation");
    }

    int cols = cm.getColumnCount();

    for (HeaderGroupConfig config : cm.getHeaderGroups()) {
View Full Code Here

    DomHelper.insertHtml("afterBegin", tbody, renderHiddenHeaders(getColumnWidths()).asString());

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows++;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, styles.headRow());
    }

    int cols = cm.getColumnCount();

    String cellClass = styles.header() + " " + styles.head();
View Full Code Here

    table.setWidth(cm.getTotalWidth() + "px");

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows += 1;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, "x-grid3-hd-row");
      rf.getElement(i).setAttribute("role", "presentation");
    }

    int cols = cm.getColumnCount();

    for (HeaderGroupConfig config : cm.getHeaderGroups()) {
View Full Code Here

        DOM.sinkEvents(getElement(), events);
  }
 
  @Override
  public void addStyleDependentName(String styleSuffix) {
    final RowFormatter rowFormatter = table.getRowFormatter();
        final String newStyleName = rowFormatter.getStylePrimaryName(row)+"-"+styleSuffix;
        rowFormatter.addStyleName(row, newStyleName);
  }
View Full Code Here

    table.setWidth(cm.getTotalWidth() + "px");

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows += 1;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, styles.headRow());
    }

    int cols = cm.getColumnCount();

    String cellClass = styles.header() + " " + styles.head();
View Full Code Here

    // Visable Styles.
    t.getCellFormatter().setVisible(0, 0, false);
    assertTrue(t.getCellFormatter().isVisible(2, 2));
    assertFalse(t.getCellFormatter().isVisible(0, 0));
    RowFormatter formatter = t.getRowFormatter();
    formatter.setVisible(3, false);
    assertFalse(formatter.isVisible(3));
    assertTrue(formatter.isVisible(2));
    assertTrue(t.getCellFormatter().isVisible(2, 0));

    // Style name.
    assertEquals("goodbye hello", t.getCellFormatter().getStyleName(2, 2));
    t.getRowFormatter().setStyleName(3, "newStyle");
View Full Code Here

    table.setWidth(cm.getTotalWidth() + "px");

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows += 1;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, "x-grid3-hd-row");
      rf.getElement(i).setAttribute("role", "presentation");
    }

    int cols = cm.getColumnCount();

    for (HeaderGroupConfig config : cm.getHeaderGroups()) {
View Full Code Here

    accountNum.setText(String.valueOf(user.accountNum));
    balance.setText(formatAmount(user.balance) + " CapraCoins");
    if (user.transactions != null) {
      DateTimeFormat dateFormat = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_SHORT);
      transactionsGrid.resizeRows(user.transactions.size() + 1);
      RowFormatter rowFormatter = transactionsGrid.getRowFormatter();
      int row = 1;
      for (BankTransaction transaction : user.transactions) {
        boolean isOutgoing = transaction.fromAccount == user.accountNum;
        transactionsGrid.setText(row, 0, String.valueOf(transaction.transactionId));
        transactionsGrid.setText(row, 1, dateFormat.format(transaction.timestamp));
        transactionsGrid.setText(row, 2, formatAccountNum(transaction.fromAccount, user));
        transactionsGrid.setText(row, 3, formatAccountNum(transaction.toAccount, user));
        transactionsGrid.setText(row, 4, (isOutgoing ? "- " : "+ ") + formatAmount(transaction.amount));
        transactionsGrid.setText(row, 5, transaction.comment);
        rowFormatter.addStyleName(row, isOutgoing ? "transactionsTableOutgoingTransactionRow" : "transactionsTableIncomingTransactionRow");
        row++;
      }
    }
    CellFormatter cellFormatter = transactionsGrid.getCellFormatter();
    for (int row = 0; row < transactionsGrid.getRowCount(); row++) {
View Full Code Here

    DomHelper.insertHtml("afterBegin", tbody, renderHiddenHeaders(getColumnWidths()));

    List<HeaderGroupConfig> configs = cm.getHeaderGroups();

    FlexCellFormatter cf = table.getFlexCellFormatter();
    RowFormatter rf = table.getRowFormatter();

    rows = 0;
    for (HeaderGroupConfig config : configs) {
      rows = Math.max(rows, config.getRow() + 1);
    }
    rows += 1;

    for (int i = 0; i < rows; i++) {
      rf.setStyleName(i, "x-grid3-hd-row");
      rf.getElement(i).setAttribute("role", "presentation");
    }

    int cols = cm.getColumnCount();

    String cellClass = "x-grid3-header" + " " + "x-grid3-hd";
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.HTMLTable.RowFormatter

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.