DisclosurePanelを使用しています。ヘッダーコンテンツには、適用されたスタイルのHorizo ntalPanelがあり、これらのスタイルには、@spriteでClientBundleを使用する背景画像があります。ただし、問題は、スタイルがヘッダーウィジェットに適用されていないことです(水平パネル)
ここに私のコードが行きます
エントリークラス
public class Test implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
TestClientBundle.INSTANCE.testCsss().ensureInjected();
DisclosurePanel dp = new DisclosurePanel();
HorizontalPanel hp = new HorizontalPanel();
dp.setStyleName("blue");
Label l = new Label("testing the DP with IMG-CSS bundle");
hp.add(l);
dp.setHeader(hp);
dp.setContent(new Label("Body"));
RootPanel.get().add(dp);
}
}
ClientBundleインターフェース
public interface TestClientBundle extends ClientBundle {
TestClientBundle INSTANCE = GWT.create(TestClientBundle.class);
@Source("blue.jpg")
public ImageResource blue();
@Source("test.css")
public CssResource testCsss();
}
Cssファイル
@external .blue;
@sprite .blue {
gwt-image: 'blue';
cursor: pointer;
text-decoration: none;
}
GWTの既知の問題ですか、それとも私のコードが間違っていますか?