本文整理了Java中org.gwtbootstrap3.client.ui.Button.setToggleCaret()
方法的一些代码示例,展示了Button.setToggleCaret()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setToggleCaret()
方法的具体详情如下:
包路径:org.gwtbootstrap3.client.ui.Button
类名称:Button
方法名:setToggleCaret
暂无
代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-core-common
public Builder setToggleCaret(boolean toggleCaret) {
button.setToggleCaret(toggleCaret);
return this;
}
代码示例来源:origin: oVirt/ovirt-engine
private void createRefreshMenuButton() {
dropdownButton = new Button();
dropdownButton.setToggleCaret(true);
dropdownButton.setDataToggle(Toggle.DROPDOWN);
}
代码示例来源: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: 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.kie.workbench.stunner/kie-wb-common-stunner-project-client
public MenuItem newExportsItem(final Command exportPNGCommand,
final Command exportJPGCommand,
final Command exportSVGCommand,
final Command exportPDFCommand,
final Command exportAsRawCommand) {
final DropDownMenu menu = GWT.create(DropDownMenu.class);
menu.setPull(Pull.RIGHT);
menu.add(makeExportMenuItemWidget(translationService.getValue(CoreTranslationMessages.EXPORT_PNG),
exportPNGCommand));
menu.add(makeExportMenuItemWidget(translationService.getValue(CoreTranslationMessages.EXPORT_JPG),
exportJPGCommand));
menu.add(makeExportMenuItemWidget(translationService.getValue(CoreTranslationMessages.EXPORT_SVG),
exportSVGCommand));
menu.add(makeExportMenuItemWidget(translationService.getValue(CoreTranslationMessages.EXPORT_PDF),
exportPDFCommand));
menu.add(makeExportMenuItemWidget(getExportAsRawLabel(),
exportAsRawCommand));
final Button button = GWT.create(Button.class);
final ButtonGroup buttonGroup = GWT.create(ButtonGroup.class);
buttonGroup.add(button);
buttonGroup.add(menu);
button.setToggleCaret(true);
button.setDataToggle(Toggle.DROPDOWN);
button.setIcon(IconType.DOWNLOAD);
button.setSize(ButtonSize.SMALL);
button.setTitle(translationService.getValue(StunnerProjectClientConstants.DOWNLOAD_DIAGRAM));
final IsWidget group = MenuUtils.buildHasEnabledWidget(buttonGroup,
button);
return buildItem(group);
}
内容来源于网络,如有侵权,请联系作者删除!