Search in sources :

Example 1 with Icon

use of org.gwtbootstrap3.client.ui.Icon in project ovirt-engine by oVirt.

the class PatternflyListViewItem method createItemContainerPanel.

protected Container createItemContainerPanel(Row content, boolean hidden) {
    Container panel = new Container();
    panel.addStyleName(LIST_GROUP_ITEM_CONTAINER);
    if (hidden) {
        panel.addStyleName(ExpandableListViewItem.HIDDEN);
        panel.setFluid(true);
        Button closeButton = new Button();
        closeButton.addStyleName(Styles.CLOSE);
        getClickHandlerRegistrations().add(closeButton.addClickHandler(this));
        Span icon = new Span();
        icon.addStyleName(PatternflyConstants.PFICON);
        icon.addStyleName(PatternflyConstants.PFICON_CLOSE);
        closeButton.add(icon);
        panel.add(closeButton);
    }
    panel.add(content);
    return panel;
}
Also used : Container(org.gwtbootstrap3.client.ui.Container) Button(org.gwtbootstrap3.client.ui.Button) Span(org.gwtbootstrap3.client.ui.html.Span)

Example 2 with Icon

use of org.gwtbootstrap3.client.ui.Icon in project ovirt-engine by oVirt.

the class AlertPanel method setType.

public void setType(Type type) {
    this.type = type;
    getWidget().setType(type.alertType);
    // clear all other icon style names
    for (Type t : type.getDeclaringClass().getEnumConstants()) {
        icon.removeStyleName(t.iconStyleName);
    }
    icon.addStyleName(type.iconStyleName);
}
Also used : AlertType(org.gwtbootstrap3.client.ui.constants.AlertType)

Example 3 with Icon

use of org.gwtbootstrap3.client.ui.Icon 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 4 with Icon

use of org.gwtbootstrap3.client.ui.Icon in project ovirt-engine by oVirt.

the class VmInterfaceListGroupItem method createCardPluggedStatusPanel.

private IsWidget createCardPluggedStatusPanel(boolean isPlugged) {
    Span linkStatusPanel = new Span();
    Span icon = new Span();
    icon.addStyleName(Styles.ICON_STACK);
    Italic plugItalic = new Italic();
    plugItalic.addStyleName(Styles.FONT_AWESOME_BASE);
    plugItalic.addStyleName(Styles.ICON_STACK_TOP);
    plugItalic.addStyleName(ROTATE_270);
    plugItalic.addStyleName(IconType.PLUG.getCssName());
    icon.add(plugItalic);
    if (!isPlugged) {
        Italic unplugged = new Italic();
        unplugged.addStyleName(Styles.FONT_AWESOME_BASE);
        unplugged.addStyleName(Styles.ICON_STACK_TOP);
        unplugged.addStyleName(DANGER);
        unplugged.addStyleName(IconType.BAN.getCssName());
        icon.add(unplugged);
    }
    linkStatusPanel.add(icon);
    linkStatusPanel.addStyleName(DOUBLE_SIZE);
    String tooltipText = isPlugged ? constants.pluggedNetworkInterface() : constants.unpluggedNetworkInterface();
    WidgetTooltip tooltip = new WidgetTooltip(linkStatusPanel);
    tooltip.setHtml(SafeHtmlUtils.fromString(tooltipText));
    return tooltip;
}
Also used : Italic(org.gwtbootstrap3.client.ui.html.Italic) Span(org.gwtbootstrap3.client.ui.html.Span) WidgetTooltip(org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip)

Example 5 with Icon

use of org.gwtbootstrap3.client.ui.Icon in project kie-wb-common by kiegroup.

the class BreadcrumbNavigator method ban.

private Widget ban(final Icon icon) {
    icon.setStackTop(true);
    final Icon ban = new Icon(IconType.BAN);
    final IconStack iconStack = new IconStack();
    iconStack.add(icon, false);
    iconStack.add(ban, true);
    return iconStack;
}
Also used : IconStack(org.gwtbootstrap3.client.ui.IconStack) Icon(org.gwtbootstrap3.client.ui.Icon)

Aggregations

Icon (org.gwtbootstrap3.client.ui.Icon)8 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)4 Widget (com.google.gwt.user.client.ui.Widget)4 Button (org.gwtbootstrap3.client.ui.Button)4 AbstractCell (com.google.gwt.cell.client.AbstractCell)3 ValueUpdater (com.google.gwt.cell.client.ValueUpdater)3 GWT (com.google.gwt.core.client.GWT)3 Element (com.google.gwt.dom.client.Element)3 NativeEvent (com.google.gwt.dom.client.NativeEvent)3 EventBus (com.google.gwt.event.shared.EventBus)3 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)3 Column (com.google.gwt.user.cellview.client.Column)3 DOM (com.google.gwt.user.client.DOM)3 Window (com.google.gwt.user.client.Window)3 FlexTable (com.google.gwt.user.client.ui.FlexTable)3 FlexCellFormatter (com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter)3 HTML (com.google.gwt.user.client.ui.HTML)3 HasHorizontalAlignment (com.google.gwt.user.client.ui.HasHorizontalAlignment)3 HasVerticalAlignment (com.google.gwt.user.client.ui.HasVerticalAlignment)3 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)3