singleResourceButtonItem.setShowTitle(false);
singleResourceButtonItem.setShowIfCondition(new ShowIfModeFunction(ResourceSelectionMode.SPECIFIC));
singleResourceButtonItem.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
SingleResourcePicker singleResourcePicker;
singleResourcePicker = new SingleResourcePicker(new OkHandler() {
public boolean ok(Set<Integer> resourceIdSelection) {
final int resourceId = resourceIdSelection.iterator().next().intValue();
setSpecificResource(resourceId, null, null);
return true;
}
}, null);
singleResourcePicker.show();
}
});
// for RELATIVE mode