button.setText(0, 1, text);
return button;
}
private Grid createButton(EBarButtonSystemItem systemItem) {
ViewKitResources resources = ViewKitResources.INSTANCE;
ImageResource r = null;
switch (systemItem) {
case CROSS_HAIRS:
r = resources.BarButtonSystemCrossHairsImage();
break;
case REFRESH:
default:
r = resources.BarButtonSystemRefreshImage();
break;
}
Image image = new Image(r.getURL(), r.getLeft(), r.getTop(), r.getWidth(),
r.getHeight());
Grid button = createButton();