Example usage for com.google.gwt.user.cellview.client AbstractCellTable getResources

List of usage examples for com.google.gwt.user.cellview.client AbstractCellTable getResources

Introduction

In this page you can find the example usage for com.google.gwt.user.cellview.client AbstractCellTable getResources.

Prototype

public Resources getResources() 

Source Link

Document

Get the resources used by this table.

Usage

From source file:com.geocento.webapps.eobroker.common.client.widgets.table.celltable.MyDefaultCellTableBuilder.java

License:Apache License

public MyDefaultCellTableBuilder(AbstractCellTable<T> cellTable) {
    super(cellTable);

    // Cache styles for faster access.
    Style style = cellTable.getResources().style();
    evenRowStyle = style.evenRow();/*ww  w.ja va2 s . c o m*/
    oddRowStyle = style.oddRow();
    selectedRowStyle = " " + style.selectedRow();
    cellStyle = style.cell();
    evenCellStyle = " " + style.evenRowCell();
    oddCellStyle = " " + style.oddRowCell();
    firstColumnStyle = " " + style.firstColumn();
    lastColumnStyle = " " + style.lastColumn();
    selectedCellStyle = " " + style.selectedRowCell();
}

From source file:com.gwtmodel.table.view.table.SpanCellBuilder.java

License:Apache License

SpanCellBuilder(AbstractCellTable<T> cellTable, IGetSpanColValue iSpan) {
    super(cellTable);

    // Cache styles for faster access.
    Style style = cellTable.getResources().style();
    evenRowStyle = style.evenRow();//w ww  .  j av a  2  s.  c  o m
    oddRowStyle = style.oddRow();
    selectedRowStyle = " " + style.selectedRow();
    cellStyle = style.cell();
    evenCellStyle = " " + style.evenRowCell();
    oddCellStyle = " " + style.oddRowCell();
    firstColumnStyle = " " + style.firstColumn();
    lastColumnStyle = " " + style.lastColumn();
    selectedCellStyle = " " + style.selectedRowCell();
    this.iSpan = iSpan;
}

From source file:com.jitlogic.zico.client.views.traces.TraceCallTableBuilder.java

License:Open Source License

/**
 * Construct a new table builder./* ww w . jav  a2s  .  c o  m*/
 *
 * @param cellTable the table this builder will build rows for
 */
public TraceCallTableBuilder(AbstractCellTable<TraceRecordInfo> cellTable, Set<String> expandedDetails) {
    super(cellTable);

    // Cache styles for faster access.
    AbstractCellTable.Style style = cellTable.getResources().style();
    evenRowStyle = style.evenRow();
    selectedRowStyle = " " + style.selectedRow();
    cellStyle = style.cell();
    evenCellStyle = " " + style.evenRowCell();
    firstColumnStyle = " " + style.firstColumn();
    lastColumnStyle = " " + style.lastColumn();
    selectedCellStyle = " " + style.selectedRowCell();
    extenderCellStyle = Resources.INSTANCE.zicoCssResources().methodDetailCell();

    this.colDetails = new IdentityColumn<TraceRecordInfo>(new MethodDetailCell());
    this.expandedDetails = expandedDetails;
}

From source file:com.jitlogic.zico.client.views.traces.TraceSearchTableBuilder.java

License:Open Source License

/**
 * Construct a new table builder./*from   w w w.  j  av  a 2  s  .  co m*/
 *
 * @param cellTable the table this builder will build rows for
 */
public TraceSearchTableBuilder(AbstractCellTable<TraceInfo> cellTable, Set<Long> expandedDetails) {
    super(cellTable);

    // Cache styles for faster access.
    AbstractCellTable.Style style = cellTable.getResources().style();
    evenRowStyle = style.evenRow();
    selectedRowStyle = " " + style.selectedRow();
    cellStyle = style.cell();
    evenCellStyle = " " + style.evenRowCell();
    firstColumnStyle = " " + style.firstColumn();
    lastColumnStyle = " " + style.lastColumn();
    selectedCellStyle = " " + style.selectedRowCell();
    extenderCellStyle = Resources.INSTANCE.zicoCssResources().methodDetailCell();

    this.colDetails = new IdentityColumn<TraceInfo>(new TraceDetailCell());
    this.expandedDetails = expandedDetails;
}

From source file:org.kaaproject.avro.ui.gwt.client.widget.grid.StringFilterHeaderBuilder.java

License:Apache License

@SuppressWarnings("unchecked")
@Override//from  w  ww .  ja  v  a2  s .com
protected boolean buildHeaderOrFooterImpl() {
    boolean result = super.buildHeaderOrFooterImpl();
    AbstractCellTable<T> table = getTable();
    Header<?> prevHeader = getHeader(0);
    Style style = table.getResources().style();
    StringBuilder classesBuilder = new StringBuilder(style.header());
    classesBuilder.append(" ").append(Utils.avroUiStyle.fieldWidget());

    TableRowBuilder tr = startRow();
    for (int i = 0; i < table.getColumnCount(); i++) {
        appendExtraStyles(prevHeader, classesBuilder);
        TableCellBuilder th = tr.startTH().className(classesBuilder.toString());
        Column<T, ?> column = table.getColumn(i);
        Header<?> header = null;
        if (column instanceof FiltrableStringColumn) {
            StringFilterHeader filterHeader = new StringFilterHeader(grid, (FiltrableStringColumn<T>) column,
                    new Integer(i));

            Set<String> headerEvents = filterHeader.getCell().getConsumedEvents();
            Set<String> consumedEvents = new HashSet<String>();
            if (headerEvents != null) {
                consumedEvents.addAll(headerEvents);
            }
            sinkEvents(table, consumedEvents);
            header = filterHeader;
        } else {
            header = new SafeHtmlHeader(SafeHtmlUtils.fromSafeConstant(""));
        }
        Context context = new Context(0, 0, header.getKey());
        renderHeader(th, context, header);

        th.endTH();
    }
    tr.endTR();
    return result;
}

From source file:org.roda.wui.common.client.widgets.wcag.AccessibleHeaderOrFooterBuilder.java

private SafeHtml getSortingIcon(boolean isAscending) {
    AbstractCellTable<T> table = getTable();
    SafeHtmlBuilder shb = new SafeHtmlBuilder();

    if (isAscending) {
        table.getResources().sortAscending();
        shb.appendEscaped("A");
    } else {//from  w w  w .jav a 2  s  .c om
        table.getResources().sortDescending();
        shb.appendEscaped("D");
    }

    return shb.toSafeHtml();
}