Search in sources :

Example 1 with UiCommandButton

use of org.ovirt.engine.ui.common.widget.UiCommandButton in project ovirt-engine by oVirt.

the class GuidePopupView method addButton.

private void addButton(final UICommand command, Div buttonsPanel, IconType buttonImage) {
    UiCommandButton button = new UiCommandButton(command.getTitle(), buttonImage);
    button.setCommand(command);
    // $NON-NLS-1$
    button.getElement().setId("UiCommandButton_guideButton_" + command.getTitle());
    button.setCustomContentStyle(style.actionButtonContent());
    button.addStyleName(style.actionButton());
    button.addClickHandler(event -> command.execute());
    Row row = new Row();
    Column column = new Column(ColumnSize.SM_12);
    column.add(button);
    row.add(column);
    buttonsPanel.add(row);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) UiCommandButton(org.ovirt.engine.ui.common.widget.UiCommandButton) Row(org.gwtbootstrap3.client.ui.Row)

Example 2 with UiCommandButton

use of org.ovirt.engine.ui.common.widget.UiCommandButton in project ovirt-engine by oVirt.

the class AbstractModelBoundPopupView method addFooterButton.

@Override
public HasUiCommandClickHandlers addFooterButton(String label, String uniqueId, boolean isPrimary) {
    UiCommandButton button = createCommandButton(label, uniqueId);
    asWidget().addFooterButton(button);
    focusableButtons.add(0, button);
    // Set button element ID for better accessibility
    button.asWidget().getElement().setId(ElementIdUtils.createElementId(elementId, uniqueId));
    if (isPrimary) {
        button.setAsPrimary();
    }
    return button;
}
Also used : UiCommandButton(org.ovirt.engine.ui.common.widget.UiCommandButton)

Example 3 with UiCommandButton

use of org.ovirt.engine.ui.common.widget.UiCommandButton in project ovirt-engine by oVirt.

the class DynamicUrlContentPopupView method addFooterButton.

@Override
public HasClickHandlers addFooterButton(String label) {
    UiCommandButton button = new UiCommandButton(label);
    asWidget().addFooterButton(button);
    return button;
}
Also used : UiCommandButton(org.ovirt.engine.ui.common.widget.UiCommandButton)

Example 4 with UiCommandButton

use of org.ovirt.engine.ui.common.widget.UiCommandButton in project ovirt-engine by oVirt.

the class SanStorageTargetToLunList method addLoginButton.

private void addLoginButton(HorizontalPanel panel, SanTargetModel rootModel) {
    final UiCommandButton loginButton = new UiCommandButton();
    loginButton.setCommand(rootModel.getLoginCommand());
    loginButton.setTitle(constants.storageIscsiPopupLoginButtonLabel());
    loginButton.setIcon(IconType.ARROW_RIGHT);
    loginButton.addClickHandler(event -> {
        treeScrollPosition = treeContainer.getVerticalScrollPosition();
        loginButton.getCommand().execute();
    });
    loginButton.getElement().getStyle().setFloat(Float.RIGHT);
    loginButton.getElement().getStyle().setMarginRight(6, Unit.PX);
    panel.add(loginButton);
    panel.setCellVerticalAlignment(loginButton, HasVerticalAlignment.ALIGN_MIDDLE);
    // $NON-NLS-1$
    panel.setCellWidth(loginButton, "35px");
}
Also used : UiCommandButton(org.ovirt.engine.ui.common.widget.UiCommandButton)

Aggregations

UiCommandButton (org.ovirt.engine.ui.common.widget.UiCommandButton)4 Column (org.gwtbootstrap3.client.ui.Column)1 Row (org.gwtbootstrap3.client.ui.Row)1