Search in sources :

Example 1 with FlowPanel

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

the class MenuView method addSecondaryMenuItemPlace.

private int addSecondaryMenuItemPlace(int index, String label, String href, int primaryMenuIndex) {
    // Found an existing primary menu, add the secondary menu.
    int result = -1;
    ListGroupItem primaryMenuItem = (ListGroupItem) menuListGroup.getWidget(primaryMenuIndex);
    FlowPanel secondaryMenuFlowPanel = null;
    IsWidget widget = primaryMenuItem.getWidget(2);
    if (widget instanceof FlowPanel) {
        secondaryMenuFlowPanel = (FlowPanel) widget;
    }
    if (secondaryMenuFlowPanel != null) {
        if (index >= 0 && index < secondaryMenuFlowPanel.getWidgetCount()) {
            secondaryMenuFlowPanel.insert(createSecondaryMenuItem(label, href), index + 1);
            result = index;
        } else {
            secondaryMenuFlowPanel.add(createSecondaryMenuItem(label, href));
            result = secondaryMenuFlowPanel.getWidgetCount() - 1;
        }
    }
    primaryMenuItem.add(secondaryMenuFlowPanel);
    return result;
}
Also used : IsWidget(com.google.gwt.user.client.ui.IsWidget) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) ListGroupItem(org.gwtbootstrap3.client.ui.ListGroupItem)

Example 2 with FlowPanel

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

the class AbstractMainWithDetailsTableView method addResultPanel.

private void addResultPanel(ActionPanelPresenterWidget<T, M> actionPanel) {
    resultRow = new Row();
    resultRow.addStyleName(PatternflyConstants.PF_TOOLBAR_RESULTS);
    FlowPanel resultColumn = new FlowPanel();
    resultRow.add(resultColumn);
    // $NON-NLS-1$
    resultColumn.add(new Paragraph(constants.activeTags() + ":"));
    resultList = new UnorderedList();
    resultList.addStyleName(Styles.LIST_INLINE);
    resultList.getElement().getStyle().setPaddingLeft(10, Unit.PX);
    resultColumn.add(resultList);
    resultRow.setVisible(false);
    actionPanel.setFilterResultPanel(resultRow);
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) UnorderedList(org.gwtbootstrap3.client.ui.html.UnorderedList) Row(org.gwtbootstrap3.client.ui.Row) Paragraph(org.gwtbootstrap3.client.ui.html.Paragraph)

Example 3 with FlowPanel

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

the class AbstractMainWithDetailsTableView method addBreadCrumbs.

private void addBreadCrumbs(FlowPanel container) {
    Row breadCrumbsRow = new Row();
    breadCrumbsColumn = new Column(ColumnSize.SM_12);
    breadCrumbsRow.add(breadCrumbsColumn);
    container.insert(breadCrumbsRow, 0);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row)

Example 4 with FlowPanel

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

the class DialogTabPanel method switchTab.

public void switchTab(TabListItem tabItem) {
    boolean found = false;
    for (int i = 0; i < navTabs.getWidgetCount(); i++) {
        TabListItem currentTabItem = (TabListItem) navTabs.getWidget(i);
        if (tabItem.getText().equals(currentTabItem.getText())) {
            currentTabItem.showTab();
            TabPane tabPane = (TabPane) tabContent.getWidget(i);
            // Detach and immediately re-attach so the content gets the onAttach event so they can react to being
            // made visible. Otherwise there is no way for the content to know if they are visible or not due to
            // the visibility being controlled by the 'active' class on the tab, which doesn't trigger any GWT
            // events when added.
            tabContent.remove(tabPane);
            tabContent.insert(tabPane, i);
            ((FlowPanel) tabPane.getWidget(0)).insert(tabHeaderContainer, 0);
            tabPane.getWidget(0).setHeight(height);
            tabPane.setActive(true);
            activeTab = (TabListItem) navTabs.getWidget(i);
            found = true;
        } else {
            TabPane tabPane = (TabPane) tabContent.getWidget(i);
            ((FlowPanel) tabPane.getWidget(0)).remove(tabHeaderContainer);
            tabPane.setActive(false);
        }
    }
    // If not found, set first active.
    if (!found && navTabs.getWidgetCount() > 0) {
        ((TabListItem) navTabs.getWidget(0)).showTab();
        TabPane tabPane = (TabPane) tabContent.getWidget(0);
        ((FlowPanel) tabPane.getWidget(0)).insert(tabHeaderContainer, 0);
        tabPane.setActive(true);
    }
}
Also used : TabPane(org.gwtbootstrap3.client.ui.TabPane) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) TabListItem(org.gwtbootstrap3.client.ui.TabListItem)

Example 5 with FlowPanel

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

the class HostNetworkInterfaceListViewItem method createRxColumn.

private IsWidget createRxColumn(HostInterface hostInterface) {
    Column rxCol = new Column(ColumnSize.SM_3);
    DListElement dl = Document.get().createDLElement();
    addReverseDetailItem(templates.sub(constants.rxRate(), constants.mbps()), SafeHtmlUtils.fromString(rateRenderer.render(new Double[] { hostInterface.getRxRate(), hostInterface.getSpeed().doubleValue() })), dl);
    dl.addClassName(Styles.PULL_LEFT);
    rxCol.getElement().appendChild(dl);
    FlowPanel divider = new FlowPanel();
    divider.addStyleName(RATE_DIVIDER);
    rxCol.add(divider);
    dl = Document.get().createDLElement();
    addReverseDetailItem(templates.sub(constants.rxTotal(), constants.bytes()), SafeHtmlUtils.fromString(totalRenderer.render(hostInterface.getRxTotal())), dl);
    dl.addClassName(Styles.PULL_LEFT);
    rxCol.getElement().appendChild(dl);
    return rxCol;
}
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)

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