本文整理了Java中com.vaadin.ui.Label.getValue()
方法的一些代码示例,展示了Label.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getValue()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:getValue
[英]Gets the text shown in the label.
[中]获取标签中显示的文本。
代码示例来源:origin: com.vaadin/vaadin-server
@Override
public void writeDesign(Element design, DesignContext designContext) {
super.writeDesign(design, designContext);
String content = getValue();
if (content != null) {
switch (getContentMode()) {
case TEXT:
case PREFORMATTED: {
// FIXME This attribute is not enough to be able to restore the
// content mode in readDesign. The content mode should instead
// be written directly in the attribute and restored in
// readDesign. See ticket #19435
design.attr(DESIGN_ATTR_PLAIN_TEXT, true);
String encodeForTextNode = DesignFormatter
.encodeForTextNode(content);
if (encodeForTextNode != null) {
design.html(encodeForTextNode);
}
}
break;
case HTML:
design.html(content);
break;
}
}
}
代码示例来源:origin: fi.vm.sade.organisaatio/organisaatio-ui-widgets
public String getSelectedName() {
if (this.searchResult != null && this.searchResult.getValue() != null) {
return (String) searchResult.getValue();
} else {
return null;
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
@Override
public String getRawValue() {
return component.getValue();
}
}
代码示例来源:origin: vaadin/material-theme-fw8
public String getCaption() {
return this.caption.getValue();
}
代码示例来源:origin: vaadin/material-theme-fw8
public String getLabel() {
return label.getValue();
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
@Override
public String getDescription() {
return description.getValue();
}
代码示例来源:origin: uk.q3c.krail/krail
@Override
public String getStatusMessage() {
return statusMsgLabel.getValue();
}
代码示例来源:origin: org.metawidget.modules/metawidget-all
/**
* Overridden to get the value using our lookup.
*/
@Override
public String getValue() {
String value = super.getValue();
String lookup = mLookup.get( value );
if ( lookup != null ) {
return lookup;
}
return value;
}
}
代码示例来源:origin: eclipse/hawkbit
private void singleMultiOptionGroup() {
final List<String> optionValues = new ArrayList<>();
optionValues.add(singleAssign.getValue());
optionValues.add(multiAssign.getValue());
assignOptionGroupByValues(optionValues);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void singleMultiOptionGroup() {
final List<String> optionValues = new ArrayList<>();
optionValues.add(singleAssign.getValue());
optionValues.add(multiAssign.getValue());
assignOptionGroupByValues(optionValues);
}
代码示例来源:origin: nz.co.senanque/madura-vaadinsupport
private static void switchCaption(Label label, MessageSourceAccessor messageSourceAccessor)
{
String newCaption = getTranslatedCaption((String)label.getValue(),messageSourceAccessor);
if (newCaption != null)
{
label.setValue(newCaption);
}
}
public static String getTranslatedCaption(String caption, MessageSourceAccessor messageSourceAccessor)
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Label getMandatoryLabel(final String key) {
final Label mandatoryLabel = getLabel(i18n.getMessage(key));
mandatoryLabel.setContentMode(ContentMode.HTML);
mandatoryLabel.setValue(mandatoryLabel.getValue().concat(" <span style='color:#ed473b'>*</span>"));
return mandatoryLabel;
}
代码示例来源:origin: eclipse/hawkbit
private Label getMandatoryLabel(final String key) {
final Label mandatoryLabel = getLabel(i18n.getMessage(key));
mandatoryLabel.setContentMode(ContentMode.HTML);
mandatoryLabel.setValue(mandatoryLabel.getValue().concat(" <span style='color:#ed473b'>*</span>"));
return mandatoryLabel;
}
代码示例来源:origin: eclipse/hawkbit
@Override
public void save() {
if (configurationEnabledChange) {
getTenantConfigurationManagement().addOrUpdateConfiguration(
TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, configurationEnabled);
}
if (keyChanged) {
getTenantConfigurationManagement().addOrUpdateConfiguration(
TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_KEY,
gatewayTokenkeyLabel.getValue());
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
public void save() {
if (configurationEnabledChange) {
getTenantConfigurationManagement().addOrUpdateConfiguration(
TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, configurationEnabled);
}
if (keyChanged) {
getTenantConfigurationManagement().addOrUpdateConfiguration(
TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_KEY,
gatewayTokenkeyLabel.getValue());
}
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Clears the left toolbar buttons.<p>
*/
public void clearButtonsLeft() {
m_itemsLeft.removeAllComponents();
m_leftButtons.removeAllComponents();
// in case the app title is set, make sure to keep the label in the button bar
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_appIndicator.getValue())) {
m_itemsLeft.addComponent(m_appIndicator);
}
updateFoldingThreshhold();
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void resetComponents() {
queryTextField.clear();
queryTextField.focus();
headerCaption.setVisible(true);
breadcrumbName.setValue(headerCaption.getValue());
nameLabel.setValue("");
saveButton.setEnabled(false);
titleFilterIconsLayout.removeStyleName(SPUIStyleDefinitions.TARGET_FILTER_CAPTION_LAYOUT);
}
代码示例来源:origin: eclipse/hawkbit
private void resetComponents() {
queryTextField.clear();
queryTextField.focus();
headerCaption.setVisible(true);
breadcrumbName.setValue(headerCaption.getValue());
nameLabel.setValue("");
saveButton.setEnabled(false);
titleFilterIconsLayout.removeStyleName(SPUIStyleDefinitions.TARGET_FILTER_CAPTION_LAYOUT);
}
代码示例来源:origin: eclipse/hawkbit
private void populateComponents() {
filterManagementUIState.getTfQuery().ifPresent(query -> {
queryTextField.setValue(query.getQuery());
nameLabel.setValue(query.getName());
oldFilterName = query.getName();
oldFilterQuery = query.getQuery();
});
breadcrumbName.setValue(nameLabel.getValue());
queryTextField.showValidationSuccesIcon(filterManagementUIState.getFilterQueryValue());
titleFilterIconsLayout.addStyleName(SPUIStyleDefinitions.TARGET_FILTER_CAPTION_LAYOUT);
headerCaption.setVisible(false);
setUpCaptionLayout(false);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Test
public void displayFileNameWithoutExtension() {
// GIVEN
ResurfaceBasicUploadField<UploadReceiver> uploadField = new ResurfaceBasicUploadField<UploadReceiver>(null, null, new BasicUploadFieldDefinition(), simpleTranslator);
receiver.setFileName("me.jpg");
Property<UploadReceiver> property = new ObjectProperty<UploadReceiver>(receiver);
// WHEN
uploadField.setPropertyDataSource(property);
// THEN
Label label = (Label) uploadField.getFileName();
assertEquals("me", label.getValue());
}
内容来源于网络,如有侵权,请联系作者删除!