造型CellTable Row取决于它的价值

时间:2014-08-25 06:33:39

标签: css gwt

我需要更改CellTble中行的颜色,具体取决于其值,我使用cellTable.css设置样式(Interface CellTable.Style)文件。

我尝试了代码:

AttendanceTable.setRowStyles(new RowStyles<AttendanceRecord>(){

            @Override
            public String getStyleNames(AttendanceRecord row, int rowIndex) {

                if(row.getName().equals("-"))
                    return"blueText";
                else
                    return"normalText";
            }

        });

并且(blueTextnormalText)都在我的project.css文件中定义,但它没有看到它们。

有什么建议吗? ... 提前致谢。

我的cellTable.css文件如下:

/**  
 * table styles     
*/

.cellTableCell {
border:0px;
border-right: 1px solid #FFFFFF;
border-bottom: 1px solid #FFFFFF;
height: 37px;
color:#7f7f7f;
font-size: 12px;
font-family: sans-serif;
padding-left: 10px;
}

.cellTableHeader {
color: #FFFFFF;
border:0px;
border-right: 1px solid #FFFFFF;
border-bottom: 5px solid #FFFFFF;
background-color: #6AA0BF;
text-align: center;
font-size:11px;
text-shadow: none;
overflow: hidden;
height: 50px;
font-family: sans-serif;
}
.cellTableEvenRow {
background: #C8CED6;
text-align: center;
}

.cellTableOddRow {
background: #DFE7F2;
text-align: center;
}

.cellTableHoveredRow {
background: #D0D8E8 ;
text-align: center;
}
.cellTableSelectedRow {
background: #ea9706;
text-align: center;

}
.cellTableSelectedRowCell {
    color: white ;
}

0 个答案:

没有答案
相关问题