use of com.haulmont.cuba.web.gui.components.WebPopupButton in project cuba by cuba-platform.
the class TablePresentations method initLayout.
protected void initLayout() {
setSpacing(true);
Label titleLabel = new Label(messages.getMainMessage("PresentationsPopup.title"));
titleLabel.setStyleName("c-table-prefs-title");
titleLabel.setWidth("-1px");
addComponent(titleLabel);
setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER);
menuBar = new CubaMenuBar();
menuBar.setStyleName("c-table-prefs-list");
menuBar.setWidth("100%");
menuBar.setHeight("-1px");
menuBar.setVertical(true);
addComponent(menuBar);
button = new WebPopupButton();
button.setCaption(messages.getMainMessage("PresentationsPopup.actions"));
addComponent(button.<Component>getComponent());
setComponentAlignment(button.<Component>getComponent(), Alignment.MIDDLE_CENTER);
textSelectionCheckBox = new CheckBox();
textSelectionCheckBox.setImmediate(true);
textSelectionCheckBox.setInvalidCommitted(true);
textSelectionCheckBox.setCaption(messages.getMainMessage("PresentationsPopup.textSelection"));
addComponent(textSelectionCheckBox);
textSelectionCheckBox.setPropertyDataSource(new AbstractProperty() {
@Override
public Object getValue() {
return tableImpl.isTextSelectionEnabled();
}
@Override
public void setValue(Object newValue) throws Property.ReadOnlyException {
if (newValue instanceof Boolean) {
tableImpl.setTextSelectionEnabled((Boolean) newValue);
}
}
@Override
public Class getType() {
return Boolean.class;
}
});
}
Aggregations