我想更改寻呼机的按钮图像(第一个,最后一个,下一个,上一个,快进).我厌倦了使用CSS,但我无法实现它.任何帮助或建议将不胜感激.我正在使用GWT 2.4.0
您需要扩展SimplePager.Resources
界面并提供自己的图像.然后将这些资源的实例传递给SimplePager构造函数:
public interface MyPagerImages extends SimplePager.Resources
{
// Here you can @Override all the methods and place @Source annotation to tell
// SimplePager what image should be loaded as a replacement
// For example here I am replacing the Fast Forward image.
@Override
@Source( "myFastForward.gif" )
ImageResource simplePagerFastForward()
}
Run Code Online (Sandbox Code Playgroud)
然后在构造SimplePager时:
MyPagerImages myImages = GWT.create(MyPagerImages.class);
SimplePager pager = new SimplePager(SimplePager.TextLocation.CENTER,
myImages, true, 1000 /* that's the default */, false);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2325 次 |
最近记录: |