Search in sources :

Example 6 with FlowPanel

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

the class HostNetworkInterfaceListViewItem method createTxColumn.

private IsWidget createTxColumn(HostInterface hostInterface) {
    Column txCol = new Column(ColumnSize.SM_3);
    DListElement dl = Document.get().createDLElement();
    addReverseDetailItem(templates.sub(constants.txRate(), constants.mbps()), SafeHtmlUtils.fromString(rateRenderer.render(new Double[] { hostInterface.getTxRate(), hostInterface.getSpeed().doubleValue() })), dl);
    dl.addClassName(Styles.PULL_LEFT);
    txCol.getElement().appendChild(dl);
    FlowPanel divider = new FlowPanel();
    divider.addStyleName(RATE_DIVIDER);
    txCol.add(divider);
    dl = Document.get().createDLElement();
    addReverseDetailItem(templates.sub(constants.txTotal(), constants.bytes()), SafeHtmlUtils.fromString(totalRenderer.render(hostInterface.getTxTotal())), dl);
    dl.addClassName(Styles.PULL_LEFT);
    txCol.getElement().appendChild(dl);
    return txCol;
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) AbstractIconTypeColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractIconTypeColumn) TextColumn(com.google.gwt.user.cellview.client.TextColumn) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) DListElement(com.google.gwt.dom.client.DListElement)

Example 7 with FlowPanel

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

the class EventsListPopover method createTitleHeader.

private IsWidget createTitleHeader(String title) {
    FlowPanel header = new FlowPanel();
    header.addStyleName(PatternflyConstants.PF_DRAWER_TITLE);
    titleAnchor = new Anchor();
    titleAnchor.addStyleName(PatternflyConstants.PF_DRAWER_TOGGLE_EXPAND);
    titleAnchor.addClickHandler(e -> toggle());
    header.add(titleAnchor);
    Anchor closeAnchor = new Anchor();
    closeAnchor.addStyleName(PatternflyConstants.PF_DRAWER_CLOSE);
    closeAnchor.addStyleName(PatternflyConstants.PFICON);
    closeAnchor.addStyleName(PatternflyConstants.PFICON_CLOSE);
    closeAnchor.addClickHandler(e -> hide());
    header.add(closeAnchor);
    Heading titleHeading = new Heading(HeadingSize.H3, title);
    titleHeading.addStyleName(PatternflyConstants.CENTER_TEXT);
    header.add(titleHeading);
    return header;
}
Also used : Anchor(org.gwtbootstrap3.client.ui.Anchor) Heading(org.gwtbootstrap3.client.ui.Heading) FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Example 8 with FlowPanel

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

the class ChangeProfileDevCommand method showModal.

private void showModal() {
    final HTMLElement selectorView = profileSelector.getView().getElement();
    final Bs3Modal modal = modalFactory.get();
    modal.setFooterContent(new FlowPanel());
    modal.setModalTitle("Choose profile");
    modal.setContent(ElementWrapperWidget.getWidget(selectorView));
    modal.show();
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) FlowPanel(org.gwtbootstrap3.client.ui.gwt.FlowPanel) Bs3Modal(org.uberfire.client.views.pfly.modal.Bs3Modal)

Example 9 with FlowPanel

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

the class DialogTabPanel method addTab.

@UiChild(tagname = "tab")
public void addTab(final DialogTab tab) {
    navTabs.add(tab.getTabListItem());
    tab.getTabListItem().addStyleName(Styles.LIST_GROUP_ITEM);
    // $NON-NLS-1$
    String tabId = "tab" + navTabs.getWidgetCount();
    tab.getTabListItem().setDataTarget(tabId);
    tab.getTabListItem().addShownHandler(event -> switchTab(event.getTab()));
    TabPane pane = new TabPane();
    FlowPanel panel = new FlowPanel();
    panel.add(tab.getContent());
    pane.add(panel);
    pane.setId(tabId);
    tabContent.add(pane);
    // Switch to first tab automatically
    if (tabContent.getWidgetCount() == 1) {
        switchTab(tab);
    }
}
Also used : TabPane(org.gwtbootstrap3.client.ui.TabPane) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) UiChild(com.google.gwt.uibinder.client.UiChild)

Example 10 with FlowPanel

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

the class MenuView method createSecondaryMenuHeader.

private FlowPanel createSecondaryMenuHeader(ListGroupItem primaryMenuItem) {
    FlowPanel secondaryMenuFlowPanel;
    // This is a menu item with no secondary menu
    secondaryMenuFlowPanel = new FlowPanel();
    secondaryMenuFlowPanel.addStyleName(PatternflyStyles.NAV_SECONDARY_NAV);
    FlowPanel secondaryMenuHeader = new FlowPanel();
    secondaryMenuHeader.addStyleName(PatternflyStyles.NAV_ITEM_HEADER);
    secondaryMenuFlowPanel.add(secondaryMenuHeader);
    Anchor secondaryMenuPin = new Anchor();
    secondaryMenuPin.setHref(JAVASCRIPT);
    secondaryMenuPin.addStyleName(PatternflyStyles.SECONDARY_COLLAPSE_TOGGLE);
    secondaryMenuPin.getElement().setAttribute(Attributes.DATA_TOGGLE, PatternflyStyles.NAV_COLLAPSE_SECONDARY_NAV);
    secondaryMenuHeader.add(secondaryMenuPin);
    Span secondaryMenuHeaderLabel = new Span();
    secondaryMenuHeader.add(secondaryMenuHeaderLabel);
    for (int i = 0; i < primaryMenuItem.getWidgetCount(); i++) {
        IsWidget widget = primaryMenuItem.getWidget(i);
        if (widget.asWidget() instanceof Anchor) {
            // This is the anchor with the href, replace it with javascrip:;
            Anchor labelAnchor = (Anchor) widget.asWidget();
            for (int j = 0; j < labelAnchor.getWidgetCount(); j++) {
                if (labelAnchor.getWidget(j).getStyleName().contains(PatternflyStyles.LIST_GROUP_ITEM_VALUE)) {
                    secondaryMenuHeaderLabel.setText(((Span) labelAnchor.getWidget(j)).getText());
                }
            }
        }
    }
    primaryMenuItem.add(secondaryMenuFlowPanel);
    return secondaryMenuFlowPanel;
}
Also used : IsWidget(com.google.gwt.user.client.ui.IsWidget) Anchor(org.gwtbootstrap3.client.ui.Anchor) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) Span(org.gwtbootstrap3.client.ui.html.Span)

Aggregations

FlowPanel (com.google.gwt.user.client.ui.FlowPanel)11 Anchor (org.gwtbootstrap3.client.ui.Anchor)3 Column (org.gwtbootstrap3.client.ui.Column)3 DListElement (com.google.gwt.dom.client.DListElement)2 TextColumn (com.google.gwt.user.cellview.client.TextColumn)2 IsWidget (com.google.gwt.user.client.ui.IsWidget)2 Button (org.gwtbootstrap3.client.ui.Button)2 Heading (org.gwtbootstrap3.client.ui.Heading)2 Row (org.gwtbootstrap3.client.ui.Row)2 TabPane (org.gwtbootstrap3.client.ui.TabPane)2 AbstractIconTypeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractIconTypeColumn)2 UiChild (com.google.gwt.uibinder.client.UiChild)1 Label (com.google.gwt.user.client.ui.Label)1 ListGroupItem (org.gwtbootstrap3.client.ui.ListGroupItem)1 PageHeader (org.gwtbootstrap3.client.ui.PageHeader)1 PanelBody (org.gwtbootstrap3.client.ui.PanelBody)1 PanelCollapse (org.gwtbootstrap3.client.ui.PanelCollapse)1 PanelHeader (org.gwtbootstrap3.client.ui.PanelHeader)1 TabListItem (org.gwtbootstrap3.client.ui.TabListItem)1 FlowPanel (org.gwtbootstrap3.client.ui.gwt.FlowPanel)1