private OverlayDecorator createOverlay(String title, String caption) {
BorderLayoutBuilder layout = new BorderLayoutBuilder(0, 5);
FilterField filterField = new FilterField(table);
layout.northToSouth(caption, table, filterField).setBorder(Empty.border(10));
OverlayDecorator decorator = new OverlayDecorator(layout, title) {
@Override
protected void onOk() {
Set<CROM> selected = Sets.newHashSet(table.getSelectedObjects());
applySelection(selected);
}
@Override
protected void onHidden() {
giveFocusToTree();
}
};
decorator.setFocusReceiverWhenClosed(owner);
decorator.setFadeIn(AnimationPreference.get());
decorator.setAlpha(0.8f);
decorator.useOkAndCancel();
decorator.setBlocking(true);
return decorator;
}