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