本文整理了Java中org.gwtbootstrap3.client.ui.Button.setDataToggle()
方法的一些代码示例,展示了Button.setDataToggle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setDataToggle()
方法的具体详情如下:
包路径:org.gwtbootstrap3.client.ui.Button
类名称:Button
方法名:setDataToggle
暂无
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-common
public Builder setDataToggle(Toggle toggle) {
button.setDataToggle(toggle);
return this;
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
protected void initWidget(Widget widget) {
super.initWidget(widget);
// Hide the button, we need it to set the attributes on so jquery can manipulate it.
clickButton.setDataToggle(Toggle.DROPDOWN);
clickButton.setVisible(false);
}
代码示例来源:origin: oVirt/ovirt-engine
private void createRefreshMenuButton() {
dropdownButton = new Button();
dropdownButton.setToggleCaret(true);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
}
代码示例来源:origin: kiegroup/jbpm-wb
@PostConstruct
public void init() {
serverTemplateButton = GWT.create(Button.class);
serverTemplateButton.setText(constants.ServerTemplates());
serverTemplateButton.setDataToggle(Toggle.DROPDOWN);
serverTemplateButton.setSize(ButtonSize.SMALL);
dropDownServerTemplates = GWT.create(DropDownMenu.class);
dropDownServerTemplates.addStyleName(Styles.DROPDOWN_MENU + "-right");
serverTemplates = GWT.create(ButtonGroup.class);
serverTemplates.add(serverTemplateButton);
serverTemplates.add(dropDownServerTemplates);
initWidget(serverTemplates);
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = GWT.create(ButtonGroup.class);
final Button dropdownButton = GWT.create(Button.class);
dropdownButton.setText(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
dropDownMenu.setPull(Pull.RIGHT);
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
代码示例来源:origin: kiegroup/appformer
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = GWT.create(ButtonGroup.class);
final Button dropdownButton = GWT.create(Button.class);
dropdownButton.setText(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = GWT.create(DropDownMenu.class);
dropDownMenu.setPull(Pull.RIGHT);
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
代码示例来源:origin: org.uberfire/uberfire-widgets-commons
protected void setupMenuButton() {
menuButton.setDataToggle(Toggle.DROPDOWN);
menuButton.setIcon(IconType.COG);
menuButton.setTitle(constants.AutoRefresh());
menuButton.setSize(ButtonSize.SMALL);
}
代码示例来源:origin: oVirt/ovirt-engine
private Button createKebabButton() {
Button button = new Button();
button.addStyleName(Styles.DROPDOWN_TOGGLE);
button.addStyleName(BTN_LINK);
button.removeStyleName(BTN_DEFAULT);
button.setDataToggle(Toggle.DROPDOWN);
return button;
}
代码示例来源:origin: kiegroup/appformer
protected void setupMenuButton() {
menuButton.setDataToggle(Toggle.DROPDOWN);
menuButton.setIcon(IconType.COG);
menuButton.setTitle(constants.AutoRefresh());
menuButton.setSize(ButtonSize.SMALL);
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly
/**
* Checks whether or not caret should be added/removed
*/
protected void addCaretToText() {
if (hideOnSingleElement && dropDownMenu.getWidgetCount() == 1) {
button.setToggleCaret(false);
button.setDataToggle(null);
this.removeStyleName("open");
toggleStyles(true);
} else if ((dropDownMenu.getWidgetCount() > 1 || hideOnSingleElement == false && dropDownMenu.getWidgetCount() == 1)) {
button.setToggleCaret(true);
button.setDataToggle(Toggle.DROPDOWN);
button.setDataTargetWidget(this);
toggleStyles(false);
}
}
代码示例来源:origin: kiegroup/appformer
/**
* Checks whether or not caret should be added/removed
*/
protected void addCaretToText() {
if (hideOnSingleElement && dropDownMenu.getWidgetCount() == 1) {
button.setToggleCaret(false);
button.setDataToggle(null);
this.removeStyleName("open");
toggleStyles(true);
} else if ((dropDownMenu.getWidgetCount() > 1 || hideOnSingleElement == false && dropDownMenu.getWidgetCount() == 1)) {
button.setToggleCaret(true);
button.setDataToggle(Toggle.DROPDOWN);
button.setDataTargetWidget(this);
toggleStyles(false);
}
}
代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly
protected void setupToggle() {
final Button btnToggle = GWT.create(Button.class);
btnToggle.removeStyleName("btn-default");
btnToggle.addStyleName(Styles.NAVBAR_TOGGLE);
btnToggle.setDataToggle(Toggle.COLLAPSE);
btnToggle.setDataTargetWidget(navbarCollapse);
btnToggle.add(createToggleBar());
btnToggle.add(createToggleBar());
btnToggle.add(createToggleBar());
navbarHeader.add(btnToggle);
}
代码示例来源:origin: kiegroup/jbpm-wb
protected void initBulkActions(final ExtendedPagedTable<T> extendedPagedTable) {
extendedPagedTable.getRightActionsToolbar().clear();
final ButtonGroup bulkActions = GWT.create(ButtonGroup.class);
final Button bulkButton = GWT.create(Button.class);
bulkButton.setText(Constants.INSTANCE.Bulk_Actions());
bulkButton.setDataToggle(Toggle.DROPDOWN);
bulkButton.setEnabled(false);
bulkButton.getElement().getStyle().setMarginRight(5,
Style.Unit.PX);
bulkActions.add(bulkButton);
final DropDownMenu bulkDropDown = GWT.create(DropDownMenu.class);
bulkDropDown.addStyleName(Styles.DROPDOWN_MENU + "-right");
bulkDropDown.getElement().getStyle().setMarginRight(5,
Style.Unit.PX);
for (AnchorListItem item : getBulkActionsItems(extendedPagedTable)) {
bulkDropDown.add(item);
}
bulkActions.add(bulkDropDown);
extendedPagedTable.getRightActionsToolbar().add(bulkActions);
}
代码示例来源:origin: kiegroup/appformer
protected void setupToggle() {
final Button btnToggle = GWT.create(Button.class);
btnToggle.removeStyleName("btn-default");
btnToggle.addStyleName(Styles.NAVBAR_TOGGLE);
btnToggle.setDataToggle(Toggle.COLLAPSE);
btnToggle.setDataTargetWidget(navbarCollapse);
btnToggle.add(createToggleBar());
btnToggle.add(createToggleBar());
btnToggle.add(createToggleBar());
navbarHeader.add(btnToggle);
}
代码示例来源:origin: org.uberfire/uberfire-simple-docks-client
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = new ButtonGroup();
final Button dropdownButton = new Button(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = new DropDownMenu();
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
}
代码示例来源:origin: kiegroup/appformer
private Widget makeDropDownMenuButton(final String caption,
final List<Widget> widgetList) {
final ButtonGroup buttonGroup = new ButtonGroup();
final Button dropdownButton = new Button(caption);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
dropdownButton.setSize(ButtonSize.SMALL);
final DropDownMenu dropDownMenu = new DropDownMenu();
for (final Widget _item : widgetList) {
dropDownMenu.add(_item);
}
buttonGroup.add(dropdownButton);
buttonGroup.add(dropDownMenu);
return buttonGroup;
}
}
代码示例来源:origin: gwtbootstrap3/gwtbootstrap3
public NavbarCollapseButton() {
button = new Button();
button.setStyleName(Styles.NAVBAR_TOGGLE);
button.setDataToggle(Toggle.COLLAPSE);
button.add(newBarIcon());
button.add(newBarIcon());
button.add(newBarIcon());
initWidget(button);
}
代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3
public NavbarCollapseButton() {
button = new Button();
button.setStyleName(Styles.NAVBAR_TOGGLE);
button.setDataToggle(Toggle.COLLAPSE);
button.add(newBarIcon());
button.add(newBarIcon());
button.add(newBarIcon());
initWidget(button);
}
代码示例来源:origin: oVirt/ovirt-engine
private void initDropdownButton(IconType icon, boolean splitButton) {
button = new Button();
caretButton = new Button();
caretButton.setDataToggle(Toggle.DROPDOWN);
caretButton.setToggleCaret(true);
if (splitButton) {
caretButton.getElement().getStyle().setMarginLeft(0, Unit.PX);
caretButton.getElement().getStyle().setLeft(-1, Unit.PX);
textButton = button;
toolTip = new WidgetTooltip(textButton);
add(toolTip);
add(caretButton);
} else {
textButton = caretButton;
toolTip = new WidgetTooltip(textButton);
add(toolTip);
}
if (icon != null) {
textButton.setIcon(icon);
}
}
代码示例来源:origin: org.uberfire/uberfire-widgets-table
public Button createToggleButton() {
final Button button = GWT.create(Button.class);
button.addStyleName(UFTableResources.INSTANCE.CSS().columnPickerButton());
button.setDataToggle(Toggle.BUTTON);
button.setIcon(IconType.LIST_UL);
button.setTitle(CommonConstants.INSTANCE.ColumnPickerButtonTooltip());
popup.addStyleName(UFTableResources.INSTANCE.CSS().columnPickerPopup());
popup.addAutoHidePartner(button.getElement());
popup.addCloseHandler(new CloseHandler<PopupPanel>() {
public void onClose(CloseEvent<PopupPanel> popupPanelCloseEvent) {
if (popupPanelCloseEvent.isAutoClosed()) {
button.setActive(false);
}
}
});
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
if (!button.isActive()) {
showColumnPickerPopup(button.getAbsoluteLeft() + button.getOffsetWidth(),
button.getAbsoluteTop() + button.getOffsetHeight());
} else {
popup.hide(false);
}
}
});
return button;
}
内容来源于网络,如有侵权,请联系作者删除!