use of org.gwtbootstrap3.client.ui.constants.IconType 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.gwtbootstrap3.client.ui.constants.IconType in project ovirt-engine by oVirt.
the class AbstractIconButtonCell method render.
@Override
public void render(Context context, T value, SafeHtmlBuilder sb, String id) {
Icon icon = new Icon();
icon.setId(id);
StyleHelper.addEnumStyleName(icon, iconType);
// $NON-NLS-1$ //$NON-NLS-2$
icon.addStyleName(isEnabled(value) ? "icon-enabled" : "icon-disabled");
sb.append(SafeHtmlUtils.fromSafeConstant(icon.toString()));
}
use of org.gwtbootstrap3.client.ui.constants.IconType in project kie-wb-common by kiegroup.
the class AbstractToolbarItem method show.
public void show(final AbstractToolbar<S> toolbar, final S session, final AbstractToolbarCommand<S, ?> command, final Command clickHandler) {
// Initialize the command with the current session.
command.initialize(toolbar, session);
final IconType icon = command.getIcon();
final String caption = command.getCaption();
if (icon != null) {
view.setIcon(command.getIcon());
view.setIconRotate(command.getIconRotate());
} else {
view.setCaption(caption);
}
view.setTooltip(command.getTooltip());
view.setClickHandler(clickHandler);
}
use of org.gwtbootstrap3.client.ui.constants.IconType in project ovirt-engine by oVirt.
the class DropdownActionButton method initDropdownButton.
private void initDropdownButton(IconType icon, boolean splitButton) {
button = new Button();
caretButton = new Button();
caretButton.setDataToggle(Toggle.DROPDOWN);
caretButton.setToggleCaret(true);
if (splitButton) {
caretButton.getElement().getStyle().setMarginLeft(0, Unit.PX);
caretButton.getElement().getStyle().setLeft(-1, Unit.PX);
textButton = button;
toolTip = new WidgetTooltip(textButton);
add(toolTip);
add(caretButton);
} else {
textButton = caretButton;
toolTip = new WidgetTooltip(textButton);
add(toolTip);
}
if (icon != null) {
textButton.setIcon(icon);
}
}
use of org.gwtbootstrap3.client.ui.constants.IconType in project ovirt-engine by oVirt.
the class AddRemoveRowWidget method createButton.
private Button createButton(IconType iconType, ClickHandler handler) {
final Button button = new Button("", iconType, handler);
button.addStyleName(style.buttonStyle());
return button;
}
Aggregations