gpt4 book ai didi

GWT SimplePager : How to change the button images of the pager?

转载 作者:行者123 更新时间:2023-12-04 23:07:25 24 4
gpt4 key购买 nike

我想更改寻呼机的按钮图像(第一个、最后一个、下一个、上一个、快进)。我厌倦了使用 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()
}

然后在构建 SimplePager 时:
MyPagerImages myImages = GWT.create(MyPagerImages.class);
SimplePager pager = new SimplePager(SimplePager.TextLocation.CENTER,
myImages, true, 1000 /* that's the default */, false);

关于GWT SimplePager : How to change the button images of the pager?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8599630/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com