本文整理了Java中com.vaadin.ui.Label.addStyleName()
方法的一些代码示例,展示了Label.addStyleName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.addStyleName()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:addStyleName
暂无
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private static Label createConfirmationQuestion(final String question) {
final Label questionLbl = new Label(String.format("<p>%s</p>", question.replaceAll("\n", "<br/>")),
ContentMode.HTML);
questionLbl.addStyleName(SPUIStyleDefinitions.CONFIRMBOX_QUESTION_LABEL);
return questionLbl;
}
代码示例来源:origin: eclipse/hawkbit
private void updateAttributesLabelsList(final VerticalLayout attributesLayout,
final Map<String, String> attributes) {
for (final Map.Entry<String, String> entry : attributes.entrySet()) {
final Label conAttributeLabel = SPUIComponentProvider.createNameValueLabel(entry.getKey().concat(" : "),
entry.getValue() == null ? "" : entry.getValue());
conAttributeLabel.setDescription(entry.getKey().concat(" : ") + entry.getValue());
conAttributeLabel.addStyleName("label-style");
attributesLayout.addComponent(conAttributeLabel);
}
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addDescription() {
descriptionLabel = new Label();
descriptionLabel.addStyleName(Reindeer.LABEL_SMALL);
descriptionLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_UPLOAD_DESCRIPTION);
descriptionLabel.setVisible(false);
addComponent(descriptionLabel);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initTitle() {
Label title = new Label();
title.addStyleName(Reindeer.LABEL_H1);
if (ExplorerApp.get().getEnvironment().equals(Environments.ALFRESCO)) {
title.addStyleName(ExplorerLayout.STYLE_WORKFLOW_CONSOLE_LOGO);
} else {
title.addStyleName(ExplorerLayout.STYLE_APPLICATION_LOGO);
}
addComponent(title);
setExpandRatio(title, 1.0f);
}
代码示例来源:origin: eclipse/hawkbit
private Label createLabel() {
final Label label = new Label(name);
label.setVisible(visible);
final StringBuilder style = new StringBuilder(ValoTheme.LABEL_SMALL);
style.append(' ');
style.append(ValoTheme.LABEL_BOLD);
label.addStyleName(style.toString());
if (id != null) {
label.setId(id);
}
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Component buildUnsupportedMessage() {
final Label label = new Label(i18n.getMessage("label.unsupported.browser.ie"));
label.addStyleName(ValoTheme.LABEL_FAILURE);
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private static Label getPercentHintLabel() {
final Label percentSymbol = new Label("%");
percentSymbol.addStyleName(ValoTheme.LABEL_TINY + " " + ValoTheme.LABEL_BOLD);
percentSymbol.setSizeUndefined();
return percentSymbol;
}
代码示例来源:origin: eclipse/hawkbit
private Component buildUnsupportedMessage() {
final Label label = new Label(i18n.getMessage("label.unsupported.browser.ie"));
label.addStyleName(ValoTheme.LABEL_FAILURE);
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void createUnreadMessagesLayout() {
final VerticalLayout notificationsLayout = new VerticalLayout();
notificationsLayout.setMargin(true);
notificationsLayout.setSpacing(true);
final Label title = new Label(i18n.getMessage(TITLE));
title.addStyleName(ValoTheme.LABEL_H3);
title.addStyleName(ValoTheme.LABEL_NO_MARGIN);
notificationsLayout.addComponent(title);
unreadNotifications.values().stream().forEach(value -> createNotification(notificationsLayout, value));
notificationsWindow.setContent(notificationsLayout);
}
代码示例来源:origin: org.opencms/opencms-core
/**
* @see org.opencms.ui.apps.I_CmsWorkplaceApp#initUI(org.opencms.ui.apps.I_CmsAppUIContext)
*/
public void initUI(I_CmsAppUIContext context) {
Label label = new Label(CmsVaadinUtils.getMessageText(Messages.GUI_APP_NOT_AVAILABLE_0));
label.addStyleName(ValoTheme.LABEL_H2);
label.addStyleName(OpenCmsTheme.LABEL_ERROR);
VerticalLayout content = new VerticalLayout();
content.setMargin(true);
content.addComponent(label);
context.setAppContent(content);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addTitle() {
Label eventTitle = new Label(i18nManager.getMessage(Messages.EVENT_TITLE));
eventTitle.addStyleName(Reindeer.LABEL_H2);
addComponent(eventTitle);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initEventTitle(HorizontalLayout eventsHeader) {
Label usersHeader = new Label(i18nManager.getMessage(Messages.ADMIN_DEFINITIONS));
usersHeader.addStyleName(ExplorerLayout.STYLE_H3);
eventsHeader.addComponent(usersHeader);
}
代码示例来源:origin: org.opennms.features/vaadin-surveillance-views
public Object generateCell(Table source, final Object itemId, Object columnId) {
final Optional<RowDef> rowDef = view.getRowDef((String) itemId);
final Optional<ColumnDef> columnDef = view.getColumnDef((String) columnId);
int rowIndex = view.getRows().indexOf(rowDef.orElse(null));
int colIndex = view.getColumns().indexOf(columnDef.orElse(null));
SurveillanceStatus surveillanceStatus = m_cells[rowIndex][colIndex];
Label label = new Label(surveillanceStatus.getDownEntityCount() + " of " + surveillanceStatus.getTotalEntityCount());
label.setSizeFull();
label.addStyleName(surveillanceStatus.getStatus().toLowerCase());
return label;
}
});
代码示例来源:origin: org.aperteworkflow/editor
public Label getHeaderLabel() {
I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource();
Label headerLabel = new Label();
if (stepName != null && !stepName.isEmpty()) {
headerLabel.setValue(messages.getMessage("userStep.stepName", new Object[] { stepName }));
} else {
headerLabel.setValue(messages.getMessage("userStep.noStepName"));
}
headerLabel.addStyleName("h1");
return headerLabel;
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initTitle(HorizontalLayout headerLayout) {
title = new Label(i18nManager.getMessage(Messages.TASK_PEOPLE));
title.addStyleName(ExplorerLayout.STYLE_H3);
title.setWidth(100, UNITS_PERCENTAGE);
headerLayout.addComponent(title);
headerLayout.setExpandRatio(title, 1.0f);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addSimpleRow(String labelMessageKey, String content) {
addLabel(labelMessageKey);
Label subjectLabel = new Label(content);
subjectLabel.setSizeUndefined();
subjectLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD);
gridLayout.addComponent(subjectLabel);
gridLayout.setComponentAlignment(subjectLabel, Alignment.MIDDLE_LEFT);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addConvertWarning() {
Label convertLabel = new Label(i18nManager.getMessage(Messages.PROCESS_CONVERT_POPUP_MESSAGE));
convertLabel.addStyleName(Reindeer.LABEL_SMALL);
addComponent(convertLabel);
// Some empty space
Label emptySpace = new Label(" ", Label.CONTENT_XHTML);
addComponent(emptySpace);
}
代码示例来源:origin: eclipse/hawkbit
private static Label createGroupTargetsLabel() {
final Label label = new LabelBuilder().visible(false).name("").buildLabel();
label.addStyleName("rollout-group-count");
label.setSizeUndefined();
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private static Label createCountLabel() {
final Label groupSize = new LabelBuilder().visible(false).name("").buildLabel();
groupSize.addStyleName(ValoTheme.LABEL_TINY + " " + "rollout-target-count-message");
groupSize.setImmediate(true);
groupSize.setSizeUndefined();
return groupSize;
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addProfileInputField(GridLayout layout, String name, AbstractField inputField, String inputFieldValue) {
Label label = new Label(name + ": ");
label.addStyleName(ExplorerLayout.STYLE_PROFILE_FIELD);
label.setSizeUndefined();
layout.addComponent(label);
layout.setComponentAlignment(label, Alignment.MIDDLE_LEFT);
if (inputFieldValue != null) {
inputField.setValue(inputFieldValue);
}
layout.addComponent(inputField);
layout.setComponentAlignment(inputField, Alignment.MIDDLE_LEFT);
}
内容来源于网络,如有侵权,请联系作者删除!