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);
}
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;
}
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;
}
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");
}
Aggregations