use of com.storedobject.vaadin.ImageButton in project SODevelopment by syampillai.
the class ObjectGetField method createPrefixComponent.
@Override
protected Component createPrefixComponent() {
if (searchField != null) {
return searchField;
}
searchField = new TextField();
searchField.setWidth(w() + "px");
ButtonLayout buttonLayout = new ButtonLayout();
ImageButton search = new ImageButton("Search", e -> doSearch()).withBox();
if (addButton != null) {
buttonLayout.add(addButton);
}
ImageButton b = new ImageButton("Cancel", e -> {
setValue((Id) null);
searchField.focus();
}).withBox();
buttonLayout.add(b);
buttonLayout.add(search);
searchField.setPrefixComponent(buttonLayout);
return searchField;
}
use of com.storedobject.vaadin.ImageButton in project SODevelopment by syampillai.
the class ObjectSearchField method createPrefixComponent.
@Override
protected Component createPrefixComponent() {
ImageButton search = new ImageButton("Search", e -> doSearch()).withBox();
delete = new ImageButton("Delete", e -> {
setModelValue(null, true);
setPresentationValue(null);
}).withBox();
delete.setVisible(false);
return new ButtonLayout(addButton, search, delete);
}
Aggregations