GWT SimplePage:如何更改寻呼机的按钮图像?

GWT SimplePage:如何更改寻呼机的按钮图像?,gwt,Gwt,我想更改寻呼机的按钮图像(first、last、next、prev、fastforward)。我厌倦了使用CSS,但我还没能实现它。如有任何帮助或建议,将不胜感激。 我正在使用GWT2.4.0您需要扩展SimplePager.Resources界面并提供您自己的图像。然后将这些资源的一个实例传递到SimplePage构造函数中: public interface MyPagerImages extends SimplePager.Resources { // Here you can @

我想更改寻呼机的按钮图像(first、last、next、prev、fastforward)。我厌倦了使用CSS,但我还没能实现它。如有任何帮助或建议,将不胜感激。
我正在使用GWT2.4.0

您需要扩展
SimplePager.Resources
界面并提供您自己的图像。然后将这些资源的一个实例传递到SimplePage构造函数中:

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() 
}
然后在构造SimplePage时:

MyPagerImages myImages = GWT.create(MyPagerImages.class);
SimplePager pager = new SimplePager(SimplePager.TextLocation.CENTER, 
  myImages, true, 1000 /* that's the default */, false);