friendlyEnvironmentName(),
imageOfEnvironment(environmentName_, environmentIsLocal_),
environmentMenu_);
toolbar.addLeftWidget(environmentButton_);
SearchWidget searchWidget = new SearchWidget(new SuggestOracle() {
@Override
public void requestSuggestions(Request request, Callback callback)
{
// no suggestions
callback.onSuggestionsReady(
request,
new Response(new ArrayList<Suggestion>()));
}
});
searchWidget.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event)
{
objects_.setFilterText(event.getValue());
}
});
searchWidget.getElement().getStyle().setMarginTop(1, Unit.PX);
toolbar.addRightWidget(searchWidget);
return toolbar;
}