本文整理了Java中com.vaadin.ui.Label.setStyleName()
方法的一些代码示例,展示了Label.setStyleName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setStyleName()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:setStyleName
暂无
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
if (custFUIEvent == CustomFilterUIEvent.UPDATE_TARGET_FILTER_SEARCH_ICON) {
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
if (!isValidationError()) {
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
} else {
validationIcon.setStyleName(SPUIStyleDefinitions.ERROR_ICON);
}
}
}
代码示例来源:origin: eclipse/hawkbit
private static Label createMandatoryLabel(final boolean mandatory) {
final Label mandatoryLable = mandatory ? HawkbitCommonUtil.getFormatedLabel(" * ")
: HawkbitCommonUtil.getFormatedLabel(" ");
if (mandatory) {
mandatoryLable.setStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR);
}
return mandatoryLable;
}
}
代码示例来源:origin: eclipse/hawkbit
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final CustomFilterUIEvent custFUIEvent) {
if (custFUIEvent == CustomFilterUIEvent.UPDATE_TARGET_FILTER_SEARCH_ICON) {
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
if (!isValidationError()) {
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
} else {
validationIcon.setStyleName(SPUIStyleDefinitions.ERROR_ICON);
}
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* Sets the spinner as progress indicator.
*/
public void showValidationInProgress() {
validationIcon.setValue(null);
validationIcon.addStyleName("show-status-label");
validationIcon.setStyleName(SPUIStyleDefinitions.TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
public WebTimeZoneIndicator() {
component = new Label();
component.setSizeUndefined();
component.setStyleName(USER_TIMEZONE_LABEL_STYLENAME);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private static Label createMandatoryLabel(final boolean mandatory) {
final Label mandatoryLable = mandatory ? HawkbitCommonUtil.getFormatedLabel(" * ")
: HawkbitCommonUtil.getFormatedLabel(" ");
if (mandatory) {
mandatoryLable.setStyleName(SPUIStyleDefinitions.SP_TEXTFIELD_ERROR);
}
return mandatoryLable;
}
}
代码示例来源:origin: eclipse/hawkbit
/**
* Sets the spinner as progress indicator.
*/
public void showValidationInProgress() {
validationIcon.setValue(null);
validationIcon.addStyleName("show-status-label");
validationIcon.setStyleName(SPUIStyleDefinitions.TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* Clears the textfield and resets the validation icon.
*/
public void clear() {
queryTextField.clear();
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
validationIcon.setStyleName("hide-status-label");
}
代码示例来源:origin: eclipse/hawkbit
/**
* Clears the textfield and resets the validation icon.
*/
public void clear() {
queryTextField.clear();
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
validationIcon.setStyleName("hide-status-label");
}
代码示例来源:origin: org.opencms/opencms-core
public Object generateCell(Table source, Object itemId, Object columnId) {
if (CAPTION_FOLDERS.equals(columnId)) {
String html = (String)source.getContainerDataSource().getItem(itemId).getItemProperty(
CmsResourceTableProperty.PROPERTY_TREE_CAPTION).getValue();
Label label = new Label(html, ContentMode.HTML);
label.setStyleName("o-tree-table-caption");
return label;
} else {
return null;
}
}
};
代码示例来源:origin: eclipse/hawkbit
/**
* Shows the validation success icon in the textfield
*
* @param text
* the text to store in the UI state object
*/
public void showValidationSuccesIcon(final String text) {
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
filterManagementUIState.setFilterQueryValue(text);
filterManagementUIState.setIsFilterByInvalidFilterQuery(Boolean.FALSE);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* Shows the validation success icon in the textfield
*
* @param text
* the text to store in the UI state object
*/
public void showValidationSuccesIcon(final String text) {
validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
validationIcon.setStyleName(SPUIStyleDefinitions.SUCCESS_ICON);
filterManagementUIState.setFilterQueryValue(text);
filterManagementUIState.setIsFilterByInvalidFilterQuery(Boolean.FALSE);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Label buildAttributesUpdateLabel() {
final Label attributesUpdateLabel = new Label();
attributesUpdateLabel.setStyleName(ValoTheme.LABEL_SMALL);
attributesUpdateLabel.setValue(getI18n().getMessage("label.target.attributes.update.pending"));
return attributesUpdateLabel;
}
代码示例来源:origin: eclipse/hawkbit
private Component buildVersionInfo() {
final Label label = new Label();
label.setSizeFull();
label.setStyleName("version-layout");
label.setValue(serverProperties.getBuild().getVersion());
return label;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void setupSearchFoldersPane(Component searchFoldersPane) {
searchFoldersPane.setHeight(100, Unit.PERCENTAGE);
searchFoldersPane.setWidth(100, Unit.PERCENTAGE);
if (isNeedFoldersTitle()) {
searchFoldersLabel = new Label(messages.getMainMessage("folders.searchFoldersRoot"));
searchFoldersLabel.setStyleName("c-folders-pane-caption");
} else {
searchFoldersLabel = null;
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
protected void setupAppFoldersPane(Component appFoldersPane) {
appFoldersPane.setHeight("100%");
appFoldersPane.setWidth("100%");
if (isNeedFoldersTitle()) {
appFoldersLabel = new Label(messages.getMainMessage("folders.appFoldersRoot"));
appFoldersLabel.setStyleName("c-folders-pane-caption");
} else {
appFoldersLabel = null;
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Component buildVersionInfo() {
final Label label = new Label();
label.setSizeFull();
label.setStyleName("version-layout");
label.setValue(serverProperties.getBuild().getVersion());
return label;
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static HorizontalLayout labelWithIcon(Resource image, String caption, String style, String description) {
Embedded img = new Embedded(null, image);
img.setDescription(description);
Label label = new Label(caption, Label.CONTENT_XHTML);
label.setDescription(description);
if (style != null) {
label.setStyleName(style);
}
HorizontalLayout hl = VaadinUtility.horizontalLayout(Alignment.MIDDLE_LEFT, img, label);
hl.setWidth(-1, Sizeable.UNITS_PIXELS);
return hl;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private HorizontalLayout buildViewTitle() {
final HorizontalLayout viewHeadercontent = new HorizontalLayout();
viewHeadercontent.setWidth("100%");
viewHeadercontent.addStyleName("view-header-layout");
viewTitle = new Label();
viewTitle.setWidth("100%");
viewTitle.setStyleName("header-content");
viewHeadercontent.addComponent(viewTitle);
viewHeadercontent.addComponent(notificationUnreadButton);
viewHeadercontent.setComponentAlignment(notificationUnreadButton, Alignment.MIDDLE_RIGHT);
return viewHeadercontent;
}
代码示例来源:origin: eclipse/hawkbit
private HorizontalLayout buildViewTitle() {
final HorizontalLayout viewHeadercontent = new HorizontalLayout();
viewHeadercontent.setWidth("100%");
viewHeadercontent.addStyleName("view-header-layout");
viewTitle = new Label();
viewTitle.setWidth("100%");
viewTitle.setStyleName("header-content");
viewHeadercontent.addComponent(viewTitle);
viewHeadercontent.addComponent(notificationUnreadButton);
viewHeadercontent.setComponentAlignment(notificationUnreadButton, Alignment.MIDDLE_RIGHT);
return viewHeadercontent;
}
内容来源于网络,如有侵权,请联系作者删除!