4
我想改變尋呼機的按鈕圖像(第一,最後,下一個,上一個,快進)。我厭倦了使用CSS,但我一直無法實現它。任何幫助或建議,將不勝感激。 我正在使用GWT 2.4.0GWT SimplePager:如何更改尋呼機的按鈕圖像?
我想改變尋呼機的按鈕圖像(第一,最後,下一個,上一個,快進)。我厭倦了使用CSS,但我一直無法實現它。任何幫助或建議,將不勝感激。 我正在使用GWT 2.4.0GWT SimplePager:如何更改尋呼機的按鈕圖像?
您需要擴展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);