/** * Sets the component's description. See {@link #getDescription()} for more * information on what the description is. * * @see #setDescription(String, ContentMode) * @param description * the new description string for the component. */ public void setDescription(String description) { setDescription(description, ContentMode.PREFORMATTED); }
@Override public void setDescription(String description, ContentMode mode) { getRootAbstractComponentOrThrow().setDescription(description, mode); }
@Override public void setDescription(String description) { getRootAbstractComponentOrThrow().setDescription(description); }
@Override public void setDescription(String description) { ((AbstractComponent) component).setDescription(description, descriptionAsHtml ? com.vaadin.shared.ui.ContentMode.HTML : com.vaadin.shared.ui.ContentMode.PREFORMATTED); }
/** * Description in NavigationButton is show on the right side of the button. * Normally with bit smaller and gray text. * * @see com.vaadin.addon.touchkit.gwt.client.theme.StyleNames#NAVIGATION_BUTTON_DESC_PILL * @see com.vaadin.ui.AbstractComponent#setDescription(java.lang.String) */ @Override public void setDescription(String description) { super.setDescription(description); }
/** * Sets the component's description. See {@link #getDescription()} for more * information on what the description is. * * The description is displayed as HTML in tooltips or directly in certain * components so care should be taken to avoid creating the possibility for * HTML injection and possibly XSS vulnerabilities. * * @param description * the new description string for the component. * @return this (for method chaining) * @see AbstractComponent#setDescription(java.lang.String) */ public default S withDescription(String description) { ((AbstractComponent) this).setDescription(description); return (S) this; }
@Override public void setDescription(String description) { if (getComposition() instanceof AbstractComponent) { ((AbstractComponent) getComposition()).setDescription(description); } }
@Override public void setDescription(String description) { if (getComposition() instanceof AbstractComponent) { ((AbstractComponent) getComposition()).setDescription(description); } }
@Override public void setDescription(String description) { if (getComposition() instanceof AbstractComponent) { ((AbstractComponent) getComposition()).setDescription(description); } }
/** * Performs messages localization * @param instance Building instance */ protected void localize(I instance) { if (caption != null) { instance.setCaption(LocalizationContext.translate(caption, true)); } if (description != null) { instance.setDescription(LocalizationContext.translate(description, true)); } }
/** * Performs messages localization * @param instance Building instance */ protected void localize(I instance) { if (caption != null) { instance.setCaption(LocalizationContext.translate(caption, true)); } if (description != null) { instance.setDescription(LocalizationContext.translate(description, true)); } }
@Override public B description(Localizable description) { getInstance().setDescription(localizeMessage(description)); return builder(); }
@Override public B description(Localizable description) { getInstance().setDescription(localizeMessage(description)); return builder(); }
/** * Applies annotation values to {@code component} * * @param component the component to be updated * @param annotationValues the annotation values to apply * @param annotationInfo used primarily to identify the Field, and therefore its name */ private void applyAnnotationValues(AbstractComponent component, AnnotationValues annotationValues, AnnotationInfo annotationInfo) { // set locale first Locale locale = annotationValues.locale.isPresent() ? annotationValues.locale.get() : currentLocale.getLocale(); component.setLocale(locale); // set caption, description & value if available if (annotationValues.captionKey.isPresent()) { component.setCaption(translate.from(annotationValues.captionKey.get(), locale)); } if (annotationValues.descriptionKey.isPresent()) { component.setDescription(translate.from(annotationValues.descriptionKey.get(), locale)); } if (annotationValues.valueKey.isPresent()) { if (component instanceof HasValue) { ((HasValue) component).setValue(translate.from(annotationValues.valueKey.get(), locale)); return; } else { log.warn("Field {} has a value annotation but does not implement HasValue. Annotation ignored", annotationInfo.getField() .getName()); } } }
component.setDescription(translate.from(annotationValues.descriptionKey.get(), locale));
skipDefaultVMField.setCaption("Skip JVM MBeans"); skipDefaultVMField.setId(MetaConfigModel.SKIP_DEFAULT_VM); ((AbstractComponent) skipDefaultVMField).setDescription("Set to include/exclude default JavaVM MBeans"); addComponent(skipDefaultVMField); ((AbstractComponent) skipNonNumberField).setDescription("Set to include/exclude non-number values"); addComponent(skipNonNumberField);
skipDefaultVMField.setCaption("Skip JVM MBeans"); skipDefaultVMField.setId(MetaConfigModel.SKIP_DEFAULT_VM); ((AbstractComponent) skipDefaultVMField).setDescription("Set to include/exclude default JavaVM MBeans"); addComponent(skipDefaultVMField); ((AbstractComponent) skipNonNumberField).setDescription("Set to include/exclude non-number values"); addComponent(skipNonNumberField);