Example usage for com.google.gwt.dom.client TableRowElement getStyle

List of usage examples for com.google.gwt.dom.client TableRowElement getStyle

Introduction

In this page you can find the example usage for com.google.gwt.dom.client TableRowElement getStyle.

Prototype

@Override
    public Style getStyle() 

Source Link

Usage

From source file:org.activityinfo.ui.client.widget.CellTableHeaderWidthApplier.java

License:Open Source License

private void setHeaderWidthInformation(boolean shouldAffix) {

    // header// w  w  w  .jav a2s  .c  o m
    if (shouldAffix) {
        table.getTableHeadElement().getStyle().setWidth(headerWidth, Style.Unit.PX);
    } else {
        table.getTableHeadElement().getStyle().clearWidth();
    }

    final NodeList<TableRowElement> headerRows = table.getTableHeadElement().getRows();
    for (int i = 0; i < headerRows.getLength(); i++) {
        final TableRowElement row = headerRows.getItem(i);

        // rows
        if (shouldAffix) {
            row.getStyle().setWidth(headerRowToWidthMap.get(i), Style.Unit.PX);
        } else {
            row.getStyle().clearWidth();
        }

        // cells
        final NodeList<TableCellElement> cells = row.getCells();
        for (int j = 0; j < cells.getLength(); j++) {
            final TableCellElement cell = cells.getItem(j);

            if (shouldAffix) {
                cell.getStyle().setWidth(headerCellToWidthMap.get(new Pair<>(i, j)), Style.Unit.PX);
            } else {
                cell.getStyle().clearWidth();
            }
        }
    }
}

From source file:org.drools.guvnor.client.widgets.decoratedgrid.VerticalMergableGridWidget.java

License:Apache License

private TableRowElement populateTableRowElement(TableRowElement tre, DynamicDataRow rowData) {

    tre.getStyle().setHeight(style.rowHeight(), Unit.PX);
    for (int iCol = 0; iCol < columns.size(); iCol++) {
        if (columns.get(iCol).isVisible()) {
            TableCellElement tce = makeTableCellElement(iCol, rowData);
            if (tce != null) {
                tre.appendChild(tce);/*from  w  ww.  j  a v a 2 s  .co  m*/
            }
        }
    }

    return tre;

}

From source file:org.drools.guvnor.client.widgets.drools.decoratedgrid.AbstractVerticalMergableGridWidget.java

License:Apache License

private TableRowElement populateTableRowElement(TableRowElement tre, DynamicDataRow rowData) {

    tre.getStyle().setHeight(resources.rowHeight(), Unit.PX);
    for (int iCol = 0; iCol < columns.size(); iCol++) {
        DynamicColumn<T> column = columns.get(iCol);
        if (column.isVisible()) {
            TableCellElement tce = makeTableCellElement(iCol, rowData);
            if (tce != null) {
                tre.appendChild(tce);/*from  ww  w .j  a v a 2  s .c o m*/
            }
        }
    }

    return tre;

}

From source file:org.mklab.taskit.client.ui.StudentPanel.java

License:Apache License

/**
 * ??????//from w  w w  .j a v  a 2  s.  c o  m
 * 
 * @param rowData 
 */
public void highlightRow(StudentwiseRecordModel.LectureScore rowData) {
    if (this.lastHighlightElement != null) {
        this.lastHighlightElement.getStyle().clearBackgroundColor();
    }

    if (rowData == null)
        return;

    final TableRowElement rowElement = this.table.getRowElement(rowData.getIndex());
    rowElement.getStyle().setBackgroundColor("#FFFFAA"); //$NON-NLS-1$
    this.lastHighlightElement = rowElement;
}