本文整理了Java中com.vaadin.ui.Label.setWidthUndefined()
方法的一些代码示例,展示了Label.setWidthUndefined()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setWidthUndefined()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:setWidthUndefined
暂无
代码示例来源:origin: viritin/viritin
/**
* Creates the header for given property. By default a simple Label is used.
* Override this method to style it or to replace it with something more
* complex.
*
* @param property the property for which header is to be created.
* @return the component used for header
*/
protected Component createHeader(Object property) {
Label header = new Label(getPropertyHeader(property.
toString()));
header.setWidthUndefined();
return header;
}
代码示例来源:origin: viritin/viritin
/**
* Creates the header for given property. By default a simple Label is used.
* Override this method to style it or to replace it with something more
* complex.
*
* @param property the property for which header is to be created.
* @return the component used for header
*/
protected Component createHeader(Object property) {
Label header = new Label(getPropertyHeader(property.
toString()));
header.setWidthUndefined();
return header;
}
代码示例来源:origin: eclipse/hawkbit
private Label newLabel(final String msgKey) {
final Label label = new LabelBuilder().name(i18n.getMessage(msgKey)).buildLabel();
label.setWidthUndefined();
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Label newLabel(final String msgKey) {
final Label label = new LabelBuilder().name(i18n.getMessage(msgKey)).buildLabel();
label.setWidthUndefined();
return label;
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Initializes the lower left component {@link #m_lowerLeftComponent} with the correctly placed "Add key"-label.
*/
private void initLowerLeftComponent() {
HorizontalLayout placeHolderLowerLeft = new HorizontalLayout();
placeHolderLowerLeft.setWidth("100%");
Label newKeyLabel = new Label(m_messages.key(Messages.GUI_CAPTION_ADD_KEY_0));
newKeyLabel.setWidthUndefined();
HorizontalLayout lowerLeft = new HorizontalLayout(placeHolderLowerLeft, newKeyLabel);
lowerLeft.setWidth("100%");
lowerLeft.setExpandRatio(placeHolderLowerLeft, 1f);
m_lowerLeftComponent = lowerLeft;
}
代码示例来源:origin: org.opencms/opencms-core
addComponent(m_fastForward);
addComponent(m_resultsLabel);
m_resultsLabel.setWidthUndefined();
m_label.setWidthUndefined();
setExpandRatio(m_resultsLabel, 1.0f);
setComponentAlignment(m_resultsLabel, Alignment.TOP_RIGHT);
代码示例来源:origin: vaadin/material-theme-fw8
public MDTextFieldBox(String label, boolean light) {
String primaryStyleName = light ? Styles.TextFieldBoxes.LIGHT : Styles.TextFieldBoxes.DARK;
setPrimaryStyleName(primaryStyleName);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.ripple.setPrimaryStyleName(primaryStyleName + "-ripple");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, ripple, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDPasswordField(String label, boolean light) {
String primaryStyleName = light ? Styles.TextFields.LIGHT : Styles.TextFields.DARK;
setPrimaryStyleName(primaryStyleName);
setFloatingLabelEnabled(true);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDTextAreaBox(String label, boolean light) {
String primaryStyleName = light ? Styles.TextFieldBoxes.LIGHT : Styles.TextFieldBoxes.DARK;
setPrimaryStyleName(primaryStyleName);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.ripple.setPrimaryStyleName(primaryStyleName + "-ripple");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, ripple, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDDateTimeField(String label, boolean light) {
String primaryStyleName = light ? Styles.DateFields.LIGHT : Styles.DateFields.DARK;
setPrimaryStyleName(primaryStyleName);
setFloatingLabelEnabled(true);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDTextField(String label, boolean light) {
String primaryStyleName = light ? Styles.TextFields.LIGHT : Styles.TextFields.DARK;
setPrimaryStyleName(primaryStyleName);
setFloatingLabelEnabled(true);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDDateField(String label, boolean light) {
String primaryStyleName = light ? Styles.DateFields.LIGHT : Styles.DateFields.DARK;
setPrimaryStyleName(primaryStyleName);
setFloatingLabelEnabled(true);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, this.helper);
}
代码示例来源:origin: vaadin/material-theme-fw8
public MDComboBox(String label, boolean light) {
String primaryStyleName = light ? Styles.ComboBoxes.LIGHT : Styles.ComboBoxes.DARK;
setPrimaryStyleName(primaryStyleName);
this.label.setValue(label);
this.label.setPrimaryStyleName(primaryStyleName + "-label");
this.label.addStyleName(RESTING);
this.label.setWidthUndefined();
this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
this.field.setPrimaryStyleName(primaryStyleName + "-input");
this.field.addFocusListener(event -> {
addStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addBlurListener(event -> {
removeStyleName("focus");
updateFloatingLabelPosition(this.field.getValue());
});
this.field.addValueChangeListener(event -> {
if (generator != null) {
Resource itemIcon = generator.apply(event.getValue());
if (itemIcon instanceof MaterialIcons) setIcon((MaterialIcons) itemIcon);
else setIcon(itemIcon);
}
updateFloatingLabelPosition(event.getValue());
});
this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
this.helper.setWidthUndefined();
addComponents(this.label, icon, field, this.helper);
setFloatingLabelEnabled(true);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
captionLabel.setWidthUndefined();
captionLabel.setStyleName("c-init-error-caption");
captionLabel.addStyleName("h2");
messageLabel.setWidthUndefined();
messageLabel.setStyleName("c-init-error-message");
messageLabel.setValue(initErrorMessage);
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
public CertificateAuthenticationConfigurationItem(final TenantConfigurationManagement tenantConfigurationManagement,
final VaadinMessageSource i18n) {
super(TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_ENABLED, tenantConfigurationManagement, i18n);
super.init("label.configuration.auth.header");
configurationEnabled = isConfigEnabled();
detailLayout = new VerticalLayout();
detailLayout.setImmediate(true);
final HorizontalLayout caRootAuthorityLayout = new HorizontalLayout();
caRootAuthorityLayout.setSpacing(true);
final Label caRootAuthorityLabel = new LabelBuilder().name("SSL Issuer Hash:").buildLabel();
caRootAuthorityLabel.setDescription(
"The SSL Issuer iRules.X509 hash, to validate against the controller request certifcate.");
caRootAuthorityLabel.setWidthUndefined();
caRootAuthorityTextField = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent();
caRootAuthorityTextField.setWidth("100%");
caRootAuthorityTextField.addTextChangeListener(event -> caRootAuthorityChanged());
caRootAuthorityLayout.addComponent(caRootAuthorityLabel);
caRootAuthorityLayout.setExpandRatio(caRootAuthorityLabel, 0);
caRootAuthorityLayout.addComponent(caRootAuthorityTextField);
caRootAuthorityLayout.setExpandRatio(caRootAuthorityTextField, 1);
caRootAuthorityLayout.setWidth("100%");
detailLayout.addComponent(caRootAuthorityLayout);
if (isConfigEnabled()) {
caRootAuthorityTextField.setValue(getCaRootAuthorityValue());
setDetailVisible(true);
}
}
代码示例来源:origin: eclipse/hawkbit
public CertificateAuthenticationConfigurationItem(final TenantConfigurationManagement tenantConfigurationManagement,
final VaadinMessageSource i18n) {
super(TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_ENABLED, tenantConfigurationManagement, i18n);
super.init("label.configuration.auth.header");
configurationEnabled = isConfigEnabled();
detailLayout = new VerticalLayout();
detailLayout.setImmediate(true);
final HorizontalLayout caRootAuthorityLayout = new HorizontalLayout();
caRootAuthorityLayout.setSpacing(true);
final Label caRootAuthorityLabel = new LabelBuilder().name("SSL Issuer Hash:").buildLabel();
caRootAuthorityLabel.setDescription(
"The SSL Issuer iRules.X509 hash, to validate against the controller request certifcate.");
caRootAuthorityLabel.setWidthUndefined();
caRootAuthorityTextField = new TextFieldBuilder(TenantConfiguration.VALUE_MAX_SIZE).buildTextComponent();
caRootAuthorityTextField.setWidth("100%");
caRootAuthorityTextField.addTextChangeListener(event -> caRootAuthorityChanged());
caRootAuthorityLayout.addComponent(caRootAuthorityLabel);
caRootAuthorityLayout.setExpandRatio(caRootAuthorityLabel, 0);
caRootAuthorityLayout.addComponent(caRootAuthorityTextField);
caRootAuthorityLayout.setExpandRatio(caRootAuthorityTextField, 1);
caRootAuthorityLayout.setWidth("100%");
detailLayout.addComponent(caRootAuthorityLayout);
if (isConfigEnabled()) {
caRootAuthorityTextField.setValue(getCaRootAuthorityValue());
setDetailVisible(true);
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web
titleLabel.setWidthUndefined();
addComponent(titleLabel);
setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER);
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
label.setWidthUndefined();
label.setStyleName("c-paging-status");
contentLayout.addComponent(label);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
messageLabel.setWidthUndefined();
HorizontalLayout messageLabelLayout = new HorizontalLayout();
messageLabelLayout.setWidth("100%");
代码示例来源:origin: org.opencms/opencms-core
+ entry.getPermissions().getPermissionString()
+ (ouName != null ? ("<br />" + ouName) : ""));
m_label.setWidthUndefined();
m_details.setIcon(FontAwesome.PLUS_SQUARE_O);
m_details.addClickListener(new ClickListener() {
内容来源于网络,如有侵权,请联系作者删除!