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

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

Introduction

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

Prototype

@Override
    public String getClassName() 

Source Link

Usage

From source file:org.rstudio.core.client.widget.FastSelectTable.java

License:Open Source License

private boolean isSelected(TableRowElement tr) {
    return tr.getClassName().contains(selectedClassName_);
}

From source file:org.rstudio.studio.client.workbench.views.history.view.HistoryEntryItemCodec.java

License:Open Source License

public boolean isValueRow(TableRowElement row) {
    return !timestampClass_.equals(row.getClassName());
}

From source file:org.ssgwt.client.ui.datagrid.SSDataGrid.java

License:Apache License

/**
 * Sets the style of a selected row at a certain index
 *
 * @param rowIndex - The index of the row that needs to change
 * @param selected - Whether or not the row is selected
 *///from   w ww  .  j a va  2  s. c o  m
private void setRowSelectedStyle(int rowIndex, boolean selected) {
    TableRowElement tableRow = dataGrid.getRowElement(rowIndex);

    String styleNames = tableRow.getClassName();
    String newStyles = styleNames;
    boolean containsStyle = styleNames.contains("selectedRow");
    if (containsStyle && !selected) {
        newStyles = "";
        String[] styles = styleNames.split(" ");
        for (int i = 0; i < styles.length; i++) {
            if (!styles[i].equals("selectedRow")) {
                newStyles += " " + styles[i];
            }
        }
    } else if (!containsStyle && selected) {
        if (!newStyles.equals("")) {
            newStyles += " ";
        }
        newStyles += "selectedRow ";
    }

    tableRow.setClassName(newStyles);

    Label l = new Label(" ");
    if (Window.Navigator.getAppName().equals("Microsoft Internet Explorer")) {
        tableRow.appendChild(l.getElement());

        tableRow.removeChild(l.getElement());
    }
}