开发者

UiBinder FlexTable style

开发者 https://www.devze.com 2022-12-21 17:45 出处:网络
I want to add different styles to different rows, Which is the best way? I\'m trying this (it doesnt works, no error but no changes开发者_StackOverflow社区):

I want to add different styles to different rows, Which is the best way?

I'm trying this (it doesnt works, no error but no changes开发者_StackOverflow社区):

  • TWO INTERFACES:

public interface StatiscticsTableResources extends ClientBundle {

public static final StatiscticsTableResources INSTANCE = GWT.create(StatiscticsTableResources.class);

@Source("StatisticsTableCss.css")
StatisticsTableCss css();

}

public interface StatisticsTableCss extends CssResource {

String tableOddRow();

}

  • THE CSS

.tableOddRow { background-color: #aeaaa2; color: blue; }

  • APLLYING THE STYLE

ftStatistics.getRowFormatter().addStyleName(i, StatiscticsTableResources.INSTANCE.css().tableOddRow());


Wild guess, you've forgotten to inject the style sheet. Somewhere at the top of the class where you apply the style, add this line:

static { StatisticsTableResources.INSTANCE.css().ensureInjected(); }
0

精彩评论

暂无评论...
验证码 换一张
取 消