如何设计GWT CellList? [英] How to style GWT CellList?

查看:146
本文介绍了如何设计GWT CellList?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我想要设计的CellList。我想改变光标风格,一个选定单元格的丑陋颜色。我检查了几个关于堆栈溢出的问题和讨论,但没有一个能够工作。
我检查了这些:

CellList GWT CSS Style

我如何设计一个gwt 2.1 CellTables头文件?



她是我的代码:

  public interface CellListResource extends CellList.Resources {


public static CellListResource INSTANCE = GWT.create(CellListResource。类);
$ b $ interface CellListStyle extends CellList.Style {

}

@Source({CellList.Style.DEFAULT_CSS,CellTableStyle.css})
CellListStyle style();
}

public SearchViewImpl(){

CompanyCell companyCell = new CompanyCell();
//它不起作用:S
companiesList = new CellList< Company>(companyCell,CellListResource.INSTANCE);

rootElement = ourUiBinder.createAndBindUi(this);

loadingImage.setVisible(false);
}

我错过了什么吗?我清除浏览器缓存,重新启动服务器,F5 F5 F5 .... F5(按下刷新一遍又一遍),什么也没有...!
感谢您的帮助。

解决方案

确保您注入了css资源。 b

  CellTableResources.INSTANCE.cellTableStyle()。ensureInjected(); 
myCellTable = new CellTable< T>(Integer.MAX_VALUE,CellTableResources.INSTANCE);

您可以按照以下链接

你如何改变鼠标突出显示?


I have a CellList that I want to style. I want to change the cursor style, the ugly color of a selected cell . I checked several questions and discussions on stack overflow,but none of them worked. I checked these one:

CellList GWT CSS Style

How do I style a gwt 2.1 CellTables headers?

Her is my code:

public interface CellListResource extends CellList.Resources {


  public static CellListResource INSTANCE = GWT.create(CellListResource.class);

  interface CellListStyle extends CellList.Style {

  }

  @Source({CellList.Style.DEFAULT_CSS, "CellTableStyle.css"})
  CellListStyle style();
}

 public SearchViewImpl() {

    CompanyCell companyCell = new CompanyCell();
//it doesn't work :S 
    companiesList = new CellList<Company>(companyCell, CellListResource.INSTANCE);

    rootElement = ourUiBinder.createAndBindUi(this);

    loadingImage.setVisible(false);
  }

Am I missing something? I Cleared Browser cache, Restarted server, F5 F5 F5 .... F5 (pressed refresh again and again) and nothing ...! Thanks for help in advance.

解决方案

Make sure you inject the css resource.

CellTableResources.INSTANCE.cellTableStyle().ensureInjected();
myCellTable = new CellTable<T>(Integer.MAX_VALUE,CellTableResources.INSTANCE);

You can follow the following link

How do you change the mouse over highlighting?

这篇关于如何设计GWT CellList?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆