Search in sources :

Example 1 with CubaMenuBar

use of com.haulmont.cuba.web.widgets.CubaMenuBar 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.setWidthUndefined();
    addComponent(titleLabel);
    setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER);
    menuBar = new CubaMenuBar();
    menuBar.setStyleName("c-table-prefs-list");
    menuBar.setWidth(100, Unit.PERCENTAGE);
    menuBar.setHeightUndefined();
    menuBar.setVertical(true);
    addComponent(menuBar);
    button = new CubaPopupButton();
    button.setCaption(messages.getMainMessage("PresentationsPopup.actions"));
    addComponent(button);
    setComponentAlignment(button, Alignment.MIDDLE_CENTER);
    textSelectionCheckBox = new CheckBox();
    textSelectionCheckBox.setCaption(messages.getMainMessage("PresentationsPopup.textSelection"));
    addComponent(textSelectionCheckBox);
    textSelectionCheckBox.setValue(tableImpl.isTextSelectionEnabled());
    textSelectionCheckBox.addValueChangeListener(e -> tableImpl.setTextSelectionEnabled(e.getValue()));
}
Also used : CubaPopupButton(com.haulmont.cuba.web.widgets.CubaPopupButton) CubaMenuBar(com.haulmont.cuba.web.widgets.CubaMenuBar)

Aggregations

CubaMenuBar (com.haulmont.cuba.web.widgets.CubaMenuBar)1 CubaPopupButton (com.haulmont.cuba.web.widgets.CubaPopupButton)1