Search in sources :

Example 1 with IconType

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);
}
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 IconType

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()));
}
Also used : Icon(org.gwtbootstrap3.client.ui.Icon)

Example 3 with IconType

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);
}
Also used : IconType(org.gwtbootstrap3.client.ui.constants.IconType)

Example 4 with IconType

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);
    }
}
Also used : Button(org.gwtbootstrap3.client.ui.Button) WidgetTooltip(org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip)

Example 5 with IconType

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;
}
Also used : Button(org.gwtbootstrap3.client.ui.Button)

Aggregations

IconType (org.gwtbootstrap3.client.ui.constants.IconType)4 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)2 Button (org.gwtbootstrap3.client.ui.Button)2 Column (org.gwtbootstrap3.client.ui.Column)2 Icon (org.gwtbootstrap3.client.ui.Icon)2 Row (org.gwtbootstrap3.client.ui.Row)2 HasCssName (com.google.gwt.dom.client.Style.HasCssName)1 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1 HandlerRegistration (com.google.gwt.event.shared.HandlerRegistration)1 CellTable (com.google.gwt.user.cellview.client.CellTable)1 TextColumn (com.google.gwt.user.cellview.client.TextColumn)1 Widget (com.google.gwt.user.client.ui.Widget)1 ListDataProvider (com.google.gwt.view.client.ListDataProvider)1 Anchor (org.gwtbootstrap3.client.ui.Anchor)1 Container (org.gwtbootstrap3.client.ui.Container)1 Tooltip (org.gwtbootstrap3.client.ui.Tooltip)1 Div (org.gwtbootstrap3.client.ui.html.Div)1 Before (org.junit.Before)1 Test (org.junit.Test)1 UiCommandButton (org.ovirt.engine.ui.common.widget.UiCommandButton)1