本文整理了Java中org.gwtbootstrap3.client.ui.Button.getWidgetCount()
方法的一些代码示例,展示了Button.getWidgetCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getWidgetCount()
方法的具体详情如下:
包路径:org.gwtbootstrap3.client.ui.Button
类名称:Button
方法名:getWidgetCount
暂无
代码示例来源:origin: kiegroup/appformer
void configureImageIcon(final Button itemButton,
final ImageResource imageResource) {
if (imageResource != null) {
final Image imageIcon = new Image(imageResource);
imageIcon.getElement().getStyle().setWidth(14,
Style.Unit.PX);
imageIcon.getElement().getStyle().setHeight(14,
Style.Unit.PX);
if (itemButton.getWidgetCount() > 1) {
imageIcon.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
imageIcon.getElement().getStyle().setTop(3,
Style.Unit.PX);
imageIcon.getElement().getStyle().setLeft(3,
Style.Unit.PX);
itemButton.getElement().getStyle().setPaddingLeft(20,
Style.Unit.PX);
itemButton.getElement().getStyle().setPosition(Style.Position.RELATIVE);
}
itemButton.insert(imageIcon,
0);
}
}
代码示例来源:origin: org.uberfire/uberfire-simple-docks-client
void configureImageIcon(final Button itemButton,
final ImageResource imageResource) {
if (imageResource != null) {
final Image imageIcon = new Image(imageResource);
imageIcon.getElement().getStyle().setWidth(14,
Style.Unit.PX);
imageIcon.getElement().getStyle().setHeight(14,
Style.Unit.PX);
if (itemButton.getWidgetCount() > 1) {
imageIcon.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
imageIcon.getElement().getStyle().setTop(3,
Style.Unit.PX);
imageIcon.getElement().getStyle().setLeft(3,
Style.Unit.PX);
itemButton.getElement().getStyle().setPaddingLeft(20,
Style.Unit.PX);
itemButton.getElement().getStyle().setPosition(Style.Position.RELATIVE);
}
itemButton.insert(imageIcon,
0);
}
}
代码示例来源:origin: oVirt/ovirt-engine
public Kebab() {
addStyleName(PatternflyConstants.PF_KEBAB_DROPDOWN);
addStyleName(Styles.DROPDOWN);
addStyleName(Styles.PULL_RIGHT);
kebabButton = createKebabButton();
// setDataToggle will call a deferred method to add the 'caret' so we need to add our deferred after
// that in the queue so we can modify the caret to be a kebab.
Scheduler.get().scheduleDeferred(() -> {
// Unfortunately we have to make assumptions about the structure of the widget in order to get at the
// reference for the caretWidget (which is normally a down arrow) to replace it with a kebab icon.
if (kebabButton.getWidgetCount() > 2) {
Widget caretWidget = kebabButton.getWidget(2);
caretWidget.removeStyleName(PatternflyConstants.PF_CARET);
caretWidget.addStyleName(Styles.FONT_AWESOME_BASE);
caretWidget.addStyleName(FA_ELLIPSIS_V);
}
});
add(kebabButton);
kebabMenu = createDropDownMenu();
add(kebabMenu);
}
内容来源于网络,如有侵权,请联系作者删除!