Java Code Examples for com.vaadin.ui.Label#setWidthUndefined()

The following examples show how to use com.vaadin.ui.Label#setWidthUndefined() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CubaRowsCount.java    From cuba with Apache License 2.0 5 votes vote down vote up
protected ComponentContainer createContentLayout() {
    CubaCssActionsLayout contentLayout = new CubaCssActionsLayout();
    contentLayout.setStyleName("c-paging-wrap");
    contentLayout.setSpacing(true);

    firstButton = new CubaButton();
    firstButton.setStyleName("c-paging-change-page");
    firstButton.addStyleName("c-paging-first");
    contentLayout.addComponent(firstButton);

    prevButton = new CubaButton();
    prevButton.setStyleName("c-paging-change-page");
    prevButton.addStyleName("c-paging-prev");
    contentLayout.addComponent(prevButton);

    label = new Label();
    label.setWidthUndefined();
    label.setStyleName("c-paging-status");
    contentLayout.addComponent(label);

    countButton = new CubaButton("[?]");
    countButton.setWidthUndefined();
    countButton.setStyleName(ValoTheme.BUTTON_LINK);
    countButton.addStyleName("c-paging-count");
    countButton.setTabIndex(-1);
    contentLayout.addComponent(countButton);

    nextButton = new CubaButton();
    nextButton.setStyleName("c-paging-change-page");
    nextButton.addStyleName("c-paging-next");
    contentLayout.addComponent(nextButton);

    lastButton = new CubaButton();
    lastButton.setStyleName("c-paging-change-page");
    lastButton.addStyleName("c-paging-last");
    contentLayout.addComponent(lastButton);

    return contentLayout;
}
 
Example 2
Source File: CertificateAuthenticationConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 5 votes vote down vote up
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(i18n.getMessage("label.configuration.auth.hashField")).buildLabel();
    caRootAuthorityLabel.setDescription(
            i18n.getMessage("label.configuration.auth.hashField.tooltip"));
    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);
    }
}
 
Example 3
Source File: TaskSliderField.java    From mycollab with GNU Affero General Public License v3.0 5 votes vote down vote up
public TaskSliderField() {
    progressLbl = new Label();
    progressLbl.setWidthUndefined();
    slider = new Slider();
    slider.setOrientation(SliderOrientation.HORIZONTAL);
    slider.setWidth(WebThemes.FORM_CONTROL_WIDTH);
    slider.addValueChangeListener(valueChangeEvent -> {
        displayValue(valueChangeEvent.getValue());
    });
    body = new MHorizontalLayout(slider, progressLbl);
}
 
Example 4
Source File: ActionAutocleanupConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
private Label newLabel(final String msgKey) {
    final Label label = new LabelBuilder().name(i18n.getMessage(msgKey)).buildLabel();
    label.setWidthUndefined();
    return label;
}
 
Example 5
Source File: MultiAssignmentsConfigurationItem.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
private Label newLabel(final String msgKey) {
    final Label label = new LabelBuilder().name(i18n.getMessage(msgKey)).buildLabel();
    label.setWidthUndefined();
    return label;
}
 
Example 6
Source File: ElementCollectionField.java    From viritin with Apache License 2.0 3 votes vote down vote up
/**
 * 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;
}
 
Example 7
Source File: ElementCollectionField.java    From viritin with Apache License 2.0 3 votes vote down vote up
/**
 * 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;
}