Examples of RowFormatter


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

    // 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

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

    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

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

    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

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

    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

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

    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");
    }

    int cols = cm.getColumnCount();

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

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

    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

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

    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

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

    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

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

    // update grid to match number of rows...
    table.resizeRows(requiredGridCount);

    // if grid had a few rows added add even/odd styles to them...

    final RowFormatter rowFormatter = table.getRowFormatter();
    final String evenRowStyle = this.getEvenRowStyle();
    final String oddRowStyle = this.getOddRowStyle();
    final String sortableColumnStyle = this.getSortableColumnStyle();
    final String sortedColumnStyle = this.getSortedColumnStyle();

    for (int row = gridRowCount; row < requiredGridCount; row++) {
      final String style = ((row & 1) == 1) ? evenRowStyle : oddRowStyle;
      rowFormatter.addStyleName(row, style);

      final CellFormatter cellFormatter = table.getCellFormatter();
      final int sortedColumn = this.getSortedColumn();

      for (int column = 0; column < columnCount; column++) {
View Full Code Here

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

                dialog.addOkButtonHandler(new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        try {
                            server.deleteFile(toFileName(url));
                            RowFormatter formatter = table.getRowFormatter();
                            int rowNumber = 0;
                            for (; rowNumber < table.getRowCount(); rowNumber++) {
                                if (formatter.getElement(rowNumber).equals(rowElem)) {
                                    break;
                                }
                            }
                            table.removeRow(rowNumber);
                        } catch (FormBuilderException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.