IButton favouritesSBtn = new IButton(messages.searchWidgetAddToFavourites());
favouritesSBtn.setIcon(BTN_FAVOURITES_IMG);
favouritesSBtn.setAutoFit(true);
favouritesSBtn.setShowDisabledIcon(false);
favouritesSBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
onAddToFavourites();
}
});
IButton favouritesRBtn = new IButton(messages.searchWidgetAddToFavourites());
favouritesRBtn.setIcon(BTN_FAVOURITES_IMG);
favouritesRBtn.setAutoFit(true);
favouritesRBtn.setShowDisabledIcon(false);
favouritesRBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
onAddToFavourites();
}
});
searchBtn = new IButton(messages.searchWidgetSearch());
searchBtn.setIcon(BTN_SEARCH_IMG);
searchBtn.setAutoFit(true);
searchBtn.setShowDisabledIcon(false);
searchBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
onSearch();
}
});
IButton resetBtn = new IButton(messages.searchWidgetReset());
resetBtn.setIcon(BTN_RESET_IMG);
resetBtn.setAutoFit(true);
resetBtn.setShowDisabledIcon(false);
resetBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
searchPanel.reset();
}
});
IButton saveBtn = new IButton(messages.searchWidgetSave());
saveBtn.setIcon(BTN_SAVE_IMG);
saveBtn.setAutoFit(true);
saveBtn.setShowDisabledIcon(false);
saveBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
onSave();
}
});
IButton cancelBtn = new IButton(messages.searchWidgetCancel());
cancelBtn.setIcon(BTN_CANCEL_IMG);
cancelBtn.setAutoFit(true);
cancelBtn.setShowDisabledIcon(false);
cancelBtn.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
close();
}
});