Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CellList GWT CSS样式_Css_Gwt - Fatal编程技术网

CellList GWT CSS样式

CellList GWT CSS样式,css,gwt,Css,Gwt,我在我的入口点创建了一个单元格列表。现在我想对其进行样式设置。(将选定单元格的颜色从蓝色更改为深黑色) 据我所知,我只需要覆盖cellList的样式,选择所选样式并更改背景颜色(然后保存在module.css中) 这就是我带来的 @sprite .cellListSelectedItem { /*gwt-image: 'cellListSelectedBackground';*/ /*BEFORE : background-color: #628cd5;*/ background-color:

我在我的入口点创建了一个单元格列表。现在我想对其进行样式设置。(将选定单元格的颜色从蓝色更改为深黑色)

据我所知,我只需要覆盖cellList的样式,选择所选样式并更改背景颜色(然后保存在module.css中)

这就是我带来的

@sprite .cellListSelectedItem {
/*gwt-image: 'cellListSelectedBackground';*/
/*BEFORE : background-color: #628cd5;*/
background-color: #2D2D2D;
color: white;
height: auto;
overflow: visible;
}
但是,每次我选择一个单元格时,它仍然显示旧颜色(#628cd5)。我做错了什么


哦,是的,我清理了项目并重新启动了服务器,还清除了浏览器缓存。

您需要告诉GWT使用新样式——仅仅将它们添加到模块CSS文件是不够的:

table = new CellTable<FooType>(12,
    CellTableResources.INSTANCE, keyProvider);
当然,对于CellTableStyle来说也是一样的:

import com.google.gwt.user.cellview.client.CellTable;

public interface CellTableStyle extends CellTable.Style {

   String DEFAULT_CSS = "path/to/your/new/CellTable.css";

   String cellTableCell();

   // ....

}
import com.google.gwt.user.cellview.client.CellTable;

public interface CellTableStyle extends CellTable.Style {

   String DEFAULT_CSS = "path/to/your/new/CellTable.css";

   String cellTableCell();

   // ....

}