use of com.storedobject.vaadin.ButtonLayout in project SODevelopment by syampillai.
the class AbstractObjectField method initComponent.
/**
* This is where the display parts of the field is initialized.
* If overridden, you need to make sure to always return the same component between calls.
*
* @return The layout component containing other display components.
*/
protected ButtonLayout initComponent() {
if (layout != null) {
return layout;
}
prefixComponent = createPrefixComponent();
layout = new ButtonLayout(prefixComponent, detailComponent);
layout.setWidthFull();
layout.setFlexGrow(1, detailComponent);
prefixComponent.setVisible(isEnabled() && !isReadOnly());
return layout;
}
use of com.storedobject.vaadin.ButtonLayout 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.ButtonLayout 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);
}
use of com.storedobject.vaadin.ButtonLayout in project SODevelopment by syampillai.
the class JournalVoucherView method createHeader.
@Override
public Component createHeader() {
ButtonLayout b = new ButtonLayout(new ELabel("Transaction:"), transaction);
b.addFiller();
b.add(new ELabel("Entries: "), count);
return b;
}
Aggregations