1

我喜欢一个客户端捆绑包:

public interface FirstClientBundle extends ClientBundle {

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

  @Source("panel-top-bg.png")
  public ImageResource panelTopBg();
}

我想在另一个 Bundle 的样式中使用来自第一个 Bundle 的图像。像这样的东西:

public interface SecondClientBundle extends ClientBundle {

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

  public interface Style extends CssResource {
    @ClassName("panelTop")
    String panelTop();
  }

  @Source({ "style.css" })
  public Style style();
}

结束CSS文件看起来像:

@sprite .panel-top {
  gwt-image: "FirstClientBundle.panelTopBg";
  height: 18px;
  cursor: move;
}

甚至可能吗?还是我应该以不同的方式做整件事?

4

1 回答 1

0

你能把第二个写成第ClientBundle一个的子接口吗?

public interface SecondClientBundle extends FirstClientBundle
于 2014-03-14T14:28:20.780 回答