GXT CSS Usage

本文介绍如何确保CSS更改生效,包括定位正确的CSS文件、定义特定样式类及使用GWT提供的方法来添加、设置和移除样式。

 

It’s pretty simple.  Some key points to note as follow:

1)       Quite often, you find your change to the .css file doesn’t take effect. The key question here, are you changing the right .css file? I find several .css files in my project. One of them is in war/css/aa.css, another is in ./css/aa.css.

 

2)       Add these definitions in the aa.css.

 

.column-disabled {

}

 

.column-selectable {

      border:1px solid;

}

 

.column-1stSeletable {

    border:1px solid;

    background-color:#9c1fee;

}

 

3)       If your source code, use like this:

 

approvalLevelCheckBox.setStyleName("column-1stSeletable");

 

4)    GWT also supplies some other related methods

 

addStyleName(“”);

setStyleName(“”);

removeStyleName(“”);

setStylePrimaryName(“”);

addStyleDependentName(“”);

removeStyleDependentName(“”);

 

And the above code equals to

 

approvalLevelCheckBox.setStylePrimaryName ("column");

approvalLevelCheckBox. addStyleDependentName ("1stSeletable");

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值