本文整理了Java中com.vaadin.ui.Button.setStyleName()
方法的一些代码示例,展示了Button.setStyleName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setStyleName()
方法的具体详情如下:
包路径:com.vaadin.ui.Button
类名称:Button
方法名:setStyleName
暂无
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
public void setButtonStyleName(String style) {
bAdd.setStyleName(style);
bModify.setStyleName(style);
bDelete.setStyleName(style);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
@Override
protected Component initContent() {
Button button = new CubaButton();
button.setStyleName(BaseTheme.BUTTON_LINK);
return button;
}
代码示例来源:origin: eclipse/hawkbit
private void setOrAddButtonStyle(final String style, final boolean setStyle) {
if (StringUtils.isEmpty(style)) {
return;
}
if (setStyle) {
// overwrite all other styles
button.setStyleName(style);
} else {
button.addStyleName(style);
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void setOrAddButtonStyle(final String style, final boolean setStyle) {
if (StringUtils.isEmpty(style)) {
return;
}
if (setStyle) {
// overwrite all other styles
button.setStyleName(style);
} else {
button.addStyleName(style);
}
}
代码示例来源:origin: eclipse/hawkbit
private static void applyPinStyle(final Button eventBtn) {
final StringBuilder style = new StringBuilder(SPUIComponentProvider.getPinButtonStyle());
style.append(' ').append(SPUIStyleDefinitions.DIST_PIN).append(' ').append("tablePin").append(' ')
.append("pin-icon-red");
eventBtn.setStyleName(style.toString());
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button linkButton(String caption, final Runnable onClick) {
Button b = button(caption, onClick);
b.setStyleName(Reindeer.BUTTON_LINK);
return b;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private static void applyPinStyle(final Button eventBtn) {
final StringBuilder style = new StringBuilder(SPUIComponentProvider.getPinButtonStyle());
style.append(' ').append(SPUIStyleDefinitions.DIST_PIN).append(' ').append("tablePin").append(' ')
.append("pin-icon-red");
eventBtn.setStyleName(style.toString());
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
public void addButton(Button button, int index) {
button.setTabIndex(-1);
button.setStyleName(BUTTON_STYLENAME);
buttons.add(index, button);
container.addComponent(button, index + 1); // 0 - field
}
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
private void initButtons(){
buttons = new ArrayList<Button>();
buttons.add(new Button("Menu Item 1", VaadinIcons.ABACUS));
buttons.add(new Button("Menu Item 2", VaadinIcons.ABACUS));
buttons.add(new Button("Menu Item 3", VaadinIcons.ABACUS));
for(Button button:buttons)
{
button.setStyleName("vertical-menu");
addComponent(button);
}
}
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button smallButton(String caption) {
Button button = new Button(caption);
button.setImmediate(true);
button.setStyleName("default small");
return button;
}
代码示例来源:origin: com.github.markash/components
public static Button build(final String caption, final String styleName, final ClickListener listener) {
Button button = new Button(caption);
if (StringUtils.isNotBlank(styleName)) {
button.setStyleName(styleName);
}
button.setWidth(100.0f, Unit.PERCENTAGE);
if (listener != null) {
button.addClickListener(listener);
}
return button;
}
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Edit");
button.setDescription("Edit this Ops Board configuration");
button.setStyleName("small");
button.addClickListener(new Button.ClickListener() {
public void buttonClick(Button.ClickEvent clickEvent) {
m_wallboardConfigView.openWallboardEditor((Wallboard) itemId);
}
});
return button;
}
});
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Remove");
button.setDescription("Delete this Surveillance View configuration");
button.setStyleName("small");
button.addClickListener(new Button.ClickListener() {
public void buttonClick(Button.ClickEvent clickEvent) {
SurveillanceViewProvider.getInstance().removeView((View) itemId);
m_beanItemContainer.removeItem(itemId);
}
});
return button;
}
});
代码示例来源:origin: com.haulmont.thirdparty/popupbutton
private Button createIconButton(String icon) {
Button b = new Button();
b.setIcon(new ThemeResource(icon));
b.setStyleName(Reindeer.BUTTON_LINK);
return b;
}
}
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Preview");
button.setDescription("Preview this Ops Board configuration");
button.setStyleName("small");
button.addClickListener(new PreviewClickListener(WallboardOverview.this, (Wallboard) itemId));
return button;
}
});
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Preview");
button.setDescription("Preview this Surveillance View configuration");
button.setStyleName("small");
button.addClickListener(new PreviewClickListener(m_surveillanceViewService, SurveillanceViewsConfigList.this, (View) itemId));
return button;
}
}
代码示例来源:origin: org.opennms.features/vaadin-surveillance-views
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Preview");
button.setDescription("Preview this Surveillance View configuration");
button.setStyleName("small");
button.addClickListener(new PreviewClickListener(m_surveillanceViewService, SurveillanceViewsConfigList.this, (View) itemId));
return button;
}
}
代码示例来源:origin: org.aperteworkflow/editor
private void initComponent() {
roleNameLabel = new Label(permissionWrapper.getRoleName());
deleteButton = new Button();
deleteButton.setCaption(" X ");
deleteButton.setStyleName(BaseTheme.BUTTON_LINK);
deleteButton.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
handler.removePermissionWrapper(permissionWrapper);
}
});
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button icon(String description, Resource icon, Button.ClickListener listener) {
Button b = new Button();
b.setStyleName("link");
b.setIcon(icon);
b.setImmediate(true);
b.setDescription(description);
if (listener != null) {
b.addListener(listener);
}
return b;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Button createBreadcrumbButton() {
final Button createFilterViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null,
SPUIButtonStyleNoBorder.class);
createFilterViewLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links");
createFilterViewLink.setDescription(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS));
createFilterViewLink.setCaption(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS));
createFilterViewLink.addClickListener(value -> showCustomFiltersView());
return createFilterViewLink;
}
内容来源于网络,如有侵权,请联系作者删除!