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