com.vaadin.ui.Label.setValue() - java examples

Here are the examples of the java api com.vaadin.ui.Label.setValue() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

87 Examples 7

19 View Complete Implementation : LabelField.java
Copyright Apache License 2.0
Author : viritin
protected void updateLabel() {
    String caption;
    if (captionGenerator != null) {
        caption = captionGenerator.getCaption(getValue());
    } else {
        caption = getValue().toString();
    }
    label.setValue(caption);
}

19 View Complete Implementation : GatewaySecurityTokenAuthenticationConfigurationItem.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public void undo() {
    configurationEnabledChange = false;
    keyChanged = false;
    gatewayTokenkeyLabel.setValue(getSecurityTokenKey());
}

19 View Complete Implementation : VaadinConfirmDialog.java
Copyright Apache License 2.0
Author : BrunoEberhard
public final void setContentMode(final ContentMode contentMode) {
    msgContentMode = contentMode;
    com.vaadin.shared.ui.ContentMode labelContentMode = com.vaadin.shared.ui.ContentMode.TEXT;
    switch(contentMode) {
        case TEXT_WITH_NEWLINES:
        case TEXT:
            labelContentMode = com.vaadin.shared.ui.ContentMode.TEXT;
            break;
        case PREFORMATTED:
            labelContentMode = com.vaadin.shared.ui.ContentMode.PREFORMATTED;
            break;
        case HTML:
            labelContentMode = com.vaadin.shared.ui.ContentMode.HTML;
            break;
    }
    messageLabel.setContentMode(labelContentMode);
    messageLabel.setValue(contentMode == ContentMode.TEXT_WITH_NEWLINES ? formatDialogMessage(originalMessageText) : originalMessageText);
}

19 View Complete Implementation : ClickableLabel.java
Copyright GNU General Public License v3.0
Author : rlsutton1
public void setValue(String value) {
    label.setValue(value);
}

19 View Complete Implementation : MilestoneTicketGroupComponent.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
private void updatereplacedle() {
    String replacedleValue;
    if (milestone == null) {
        replacedleValue = String.format("%s (%d)", UserUIContext.getMessage(GenericI18Enum.OPT_UNDEFINED), wrapBody.getComponentCount());
    } else {
        replacedleValue = new DivLessFormatter().appendChild(new A(ProjectLinkGenerator.generateMilestonePreviewLink(milestone.getProjectid(), milestone.getId())).appendText(String.format("%s (%d)", milestone.getName(), wrapBody.getComponentCount()))).write();
    }
    headerLbl.setValue(ProjectreplacedetsManager.getreplacedet(ProjectTypeConstants.MILESTONE).getHtml() + " " + replacedleValue);
}

19 View Complete Implementation : AutoCompleteTextFieldComponent.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * 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);
}

19 View Complete Implementation : GroupsLegendLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Displays the total targets or hides the label when null is supplied.
 *
 * @param totalTargets
 *            null to hide the label or a count to be displayed as total
 *            targets message
 */
public void populateTotalTargets(final Long totalTargets) {
    if (totalTargets == null) {
        totalTargetsLabel.setVisible(false);
    } else {
        totalTargetsLabel.setVisible(true);
        totalTargetsLabel.setValue(getTotalTargetMessage(totalTargets));
    }
}

19 View Complete Implementation : DefaultGridHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Updates the replacedle of the header.
 *
 * @param newreplacedle
 */
public void updatereplacedle(final String newreplacedle) {
    replacedle.setValue(newreplacedle);
}

19 View Complete Implementation : GatewaySecurityTokenAuthenticationConfigurationItem.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public void configEnable() {
    if (!configurationEnabled) {
        configurationEnabledChange = true;
    }
    configurationEnabled = true;
    setDetailVisible(true);
    String gatewayTokenKey = getSecurityTokenKey();
    if (StringUtils.isEmpty(gatewayTokenKey)) {
        gatewayTokenKey = securityTokenGenerator.generateToken();
        keyChanged = true;
    }
    gatewayTokenkeyLabel.setValue(gatewayTokenKey);
}

19 View Complete Implementation : AutoCompleteTextFieldComponent.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Clears the textfield and resets the validation icon.
 */
public void clear() {
    queryTextField.clear();
    validationIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
    validationIcon.setStyleName("hide-status-label");
}

19 View Complete Implementation : BasePortal.java
Copyright GNU General Public License v3.0
Author : rlsutton1
public void setPortalreplacedle(String replacedleText) {
    if (StringUtils.isNotBlank(replacedleText)) {
        replacedleLabel.setValue(replacedleText);
    }
}

19 View Complete Implementation : AddViewLayout.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
public void setHeader(String viewreplacedle) {
    String replacedle = viewIcon.getHtml() + " " + viewreplacedle;
    replacedleLbl.setValue(replacedle);
}

19 View Complete Implementation : CmsToolBar.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Sets the app replacedle.<p>
 *
 * @param appreplacedle the app replacedle
 */
public void setAppreplacedle(String appreplacedle) {
    if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(appreplacedle)) {
        m_appIndicator.setValue(appreplacedle);
        updateAppIndicator();
        m_appIndicator.setVisible(true);
    } else {
        m_appIndicator.setVisible(false);
    }
}

19 View Complete Implementation : ProfileView.java
Copyright The Unlicense
Author : rolandkrueger
private void updateLabelProperty() {
    label.setValue("<h1>" + (MainUI.getCurrent().getCurrentUser() == null ? "" : MainUI.getCurrent().getCurrentUser().getFullName()) + "'s Profile</h1>... not much to see here, though.");
}

19 View Complete Implementation : LoginView.java
Copyright Apache License 2.0
Author : chelu
protected void showErrorMessage() {
    errorLabel.setValue(getMessage("loginFailure"));
}

19 View Complete Implementation : AbstractTableDetailsLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected void setName(final String headerCaption, final String value) {
    caption.setValue(HawkbitCommonUtil.getSoftwareModuleName(headerCaption, value));
}

19 View Complete Implementation : CmsUserInfo.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Adds a line to the details label.<p>
 *
 * @param lineHtml the line to be added
 */
public void addDetailLine(String lineHtml) {
    lineHtml = lineHtml.isEmpty() ? HTML_SPACE : lineHtml;
    m_details.setValue(m_details.getValue() + DIV_HTML + lineHtml + DIV_END);
}

19 View Complete Implementation : VaadinConfirmDialog.java
Copyright Apache License 2.0
Author : BrunoEberhard
public final void setMessage(final String message) {
    originalMessageText = message;
    messageLabel.setValue(ContentMode.TEXT_WITH_NEWLINES == msgContentMode ? formatDialogMessage(message) : message);
}

19 View Complete Implementation : Depot.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
public void setreplacedle(String replacedle) {
    this.replacedle = replacedle;
    String depotreplacedle = (isOpened) ? String.format("%s %s", VaadinIcons.ANGLE_DOWN.getHtml(), this.replacedle) : String.format("%s %s", VaadinIcons.ANGLE_RIGHT.getHtml(), this.replacedle);
    headerLbl.setValue(depotreplacedle);
}

18 View Complete Implementation : DefaultTicketGroupComponent.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
private void updatereplacedle() {
    headerLbl.setValue(String.format("%s (%d)", replacedleValue, wrapBody.getComponentCount()));
}

18 View Complete Implementation : DemoUI.java
Copyright Apache License 2.0
Author : tehapo
private void setErrorStatus(String message) {
    statusLabel.setValue(message);
    statusLabel.addStyleName("error");
}

18 View Complete Implementation : DemoUI.java
Copyright Apache License 2.0
Author : tehapo
private void setOkStatus(String message) {
    statusLabel.setValue(message);
    statusLabel.removeStyleName("error");
}

18 View Complete Implementation : ErrorView.java
Copyright The Unlicense
Author : vaadin
@Override
public void enter(ViewChangeListener.ViewChangeEvent event) {
    explanation.setValue(String.format("You tried to navigate to a view ('%s') that does not exist.", event.getViewName()));
}

18 View Complete Implementation : CmsSetupStep02ComponentCheck.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Sets test status.
 */
public void updateColor(TestColor color) {
    switch(color) {
        case green:
            m_forwardButton.setEnabled(true);
            m_confirmCheckbox.setVisible(false);
            m_status.setValue(STATUS_GREEN);
            break;
        case yellow:
            m_forwardButton.setEnabled(false);
            m_confirmCheckbox.setVisible(true);
            m_status.setValue(STATUS_YELLOW);
            break;
        case red:
            m_forwardButton.setEnabled(false);
            m_confirmCheckbox.setVisible(true);
            m_status.setValue(STATUS_RED);
            break;
        default:
            break;
    }
}

18 View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
private void resetFeedback() {
    feedbackLabel.setValue(" ");
    feedbackPanel.removeComponent(wrongSolutionButton);
}

18 View Complete Implementation : MainView.java
Copyright GNU General Public License v3.0
Author : AskNowQA
@Override
public void message(String message) {
    feedbackLabel.setValue("<div>" + message + "</div>");
}

18 View Complete Implementation : VaadinPaginator.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public void doRefresh() {
    // update status
    int currentPage = getTotalPages() == 0 ? 0 : getPage();
    status.setValue(currentPage + " / " + getTotalPages());
    resultCount.setValue(messageSource.getMessage("vaadinPaginator.records") + getModel().getCount());
    // fill goto page select
    goTo.removeAllItems();
    for (int i = 1; i <= getModel().getTotalPages(); i++) {
        goTo.addItem(i);
    }
    if (next != null) {
        // Buttons
        next.setEnabled(hasNext());
        last.setEnabled(hasNext());
        previous.setEnabled(hasPrevious());
        first.setEnabled(hasPrevious());
    }
}

18 View Complete Implementation : TaskSliderField.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
private void displayValue(Double value) {
    if (value != null) {
        double roundValue = Math.ceil(value / 10) * 10;
        slider.setValue(roundValue);
        progressLbl.setValue(roundValue + "%");
    } else {
        slider.setValue(0d);
        progressLbl.setValue("0%");
    }
}

18 View Complete Implementation : AutoCompleteTextFieldComponent.java
Copyright Eclipse Public License 1.0
Author : eclipse
private static void setInitialStatusIconStyle(final Label statusIcon) {
    statusIcon.setValue(FontAwesome.CHECK_CIRCLE.getHtml());
    statusIcon.setStyleName("hide-status-label");
}

18 View Complete Implementation : AutoCompleteTextFieldComponent.java
Copyright Eclipse Public License 1.0
Author : eclipse
@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);
        }
    }
}

18 View Complete Implementation : AutoCompleteTextFieldComponent.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * 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);
}

18 View Complete Implementation : GatewaySecurityTokenAuthenticationConfigurationItem.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void generateGatewayToken() {
    gatewayTokenkeyLabel.setValue(securityTokenGenerator.generateToken());
    keyChanged = true;
    notifyConfigurationChanged();
}

18 View Complete Implementation : ImportPanel.java
Copyright Apache License 2.0
Author : korpling
private void appendMessage(String message) {
    lblProgress.setValue(message);
    txtMessages.setReadOnly(false);
    String oldVal = txtMessages.getValue();
    if (oldVal == null || oldVal.isEmpty()) {
        txtMessages.setValue(message);
    } else {
        txtMessages.setValue(oldVal + "\n" + message);
    }
    txtMessages.setCursorPosition(txtMessages.getValue().length() - 1);
    txtMessages.setReadOnly(true);
}

18 View Complete Implementation : HomeViewImpl.java
Copyright Apache License 2.0
Author : markoradinovic
@Override
public void initView(String userName, String loginType) {
    caption.setValue("Welcome back " + userName + "!");
    loginInfo.setValue("You are signed in using " + loginType + "!");
}

18 View Complete Implementation : SignInViewImpl.java
Copyright Apache License 2.0
Author : markoradinovic
@Override
public void setErrorMessage(String error) {
    errorMessage.setValue(error);
    errorMessage.setVisible(true);
}

18 View Complete Implementation : UserViewImpl.java
Copyright Apache License 2.0
Author : markoradinovic
@Override
public void setMessage(String message) {
    dummyInfo.setValue(message);
}

17 View Complete Implementation : SnapshotView.java
Copyright Apache License 2.0
Author : alenca
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
    // common part: create layout
    verticalLayout_2 = new VerticalLayout();
    verticalLayout_2.setImmediate(false);
    verticalLayout_2.setWidth("100.0%");
    verticalLayout_2.setHeight("100.0%");
    verticalLayout_2.setMargin(true);
    // description
    description = new Label();
    description.setImmediate(false);
    description.setWidth("-1px");
    description.setHeight("-1px");
    description.setValue("Select znode or session");
    verticalLayout_2.addComponent(description);
    return verticalLayout_2;
}

17 View Complete Implementation : LoginView.java
Copyright Apache License 2.0
Author : chelu
protected void login() {
    update();
    errorLabel.setValue("");
    Credentials model = getModel();
    if (authService.validate(model.getUsername(), model.getPreplacedword())) {
        for (AuthenticationListener al : authenticationListeners) al.handleAuthentication(new AuthenticationEvent(getPanel(), getModel()));
    } else {
        showErrorMessage();
    }
    preplacedword.setValue("");
    username.setValue("");
}

17 View Complete Implementation : ArtifactDetailsLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Set replacedle of artifact details header layout.
 */
private void setreplacedleOfLayoutHeader() {
    replacedleOfArtifactDetails.setValue(HawkbitCommonUtil.getArtifactoryDetailsLabelId("", i18n));
    replacedleOfArtifactDetails.setContentMode(ContentMode.HTML);
}

17 View Complete Implementation : AbstractDashboardMenuItemNotification.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public void setNotificationUnreadValue(final AtomicInteger notificationUnread) {
    notificationsLabel.setValue(String.valueOf(notificationUnread.get()));
    notificationsLabel.setVisible(notificationUnread.get() > 0);
}

17 View Complete Implementation : MaintenanceWindowLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Set all the controls to their default values.
 */
public void clearAllControls() {
    schedule.setValue("");
    duration.setValue("");
    timeZone.setValue(getClientTimeZone());
    scheduleTranslator.setValue(i18n.getMessage(CRON_VALIDATION_ERROR));
}

17 View Complete Implementation : TargetDetails.java
Copyright Eclipse Public License 1.0
Author : eclipse
private Label buildAttributesUpdateLabel() {
    final Label attributesUpdateLabel = new Label();
    attributesUpdateLabel.setStyleName(ValoTheme.LABEL_SMALL);
    attributesUpdateLabel.setValue(getI18n().getMessage("label.target.attributes.update.pending"));
    return attributesUpdateLabel;
}

17 View Complete Implementation : AddUpdateRolloutWindowLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void onGroupNumberChange(final ValueChangeEvent event) {
    if (editRolloutEnabled) {
        return;
    }
    if (event.getProperty().getValue() != null && noOfGroups.isValid() && totalTargetsCount != null && isNumberOfGroups()) {
        groupSizeLabel.setValue(getTargetPerGroupMessage(String.valueOf(getGroupSize())));
        groupSizeLabel.setVisible(true);
        updateGroupsChart(Integer.parseInt(noOfGroups.getValue()));
    } else {
        groupSizeLabel.setVisible(false);
        if (isNumberOfGroups()) {
            updateGroupsChart(0);
        }
    }
}

17 View Complete Implementation : GroupsLegendLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Populates the legend based on a list of groups.
 *
 * @param groups
 *            List of groups with their name
 */
public void populateGroupsLegendByGroups(final List<RolloutGroup> groups) {
    loadingLabel.setVisible(false);
    for (int i = 0; i < getGroupsWithoutToBeContinuedLabel(groups.size()); i++) {
        final Component component = groupsLegend.getComponent(i);
        final Label label = (Label) component;
        if (groups.size() > i) {
            final int targetCount = groups.get(i).getTotalTargets();
            final String groupName = groups.get(i).getName();
            label.setValue(getTargetsInGroupMessage((long) targetCount, groupName));
            label.setVisible(true);
        } else {
            label.setValue("");
            label.setVisible(false);
        }
    }
    showOrHideToBeContinueLabel(groups);
}

17 View Complete Implementation : ProjectListViewImpl.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public void enableActionControls(int numOfSelectedItems) {
    tableActionControls.setVisible(true);
    selectedItemsNumberLabel.setValue(UserUIContext.getMessage(GenericI18Enum.TABLE_SELECTED_ITEM_replacedLE, numOfSelectedItems));
}

17 View Complete Implementation : ProjectListViewImpl.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
public void disableActionControls() {
    tableActionControls.setVisible(false);
    selectOptionButton.setSelectedCheckbox(false);
    selectedItemsNumberLabel.setValue("");
}

17 View Complete Implementation : CountryViewField.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void doSetValue(String countryCode) {
    if (StringUtils.isNotBlank(countryCode)) {
        Locale obj = new Locale("", countryCode);
        label.setValue(obj.getDisplayCountry(UserUIContext.getUserLocale()));
    } else
        label.setValue("");
}

17 View Complete Implementation : DateViewField.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
@Override
protected void doSetValue(LocalDate value) {
    String dateValue = (value == null) ? "" : UserUIContext.formatDate(value);
    label.setValue(dateValue);
}

16 View Complete Implementation : A_CmsSetupStep.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Creates a new HTML-formatted label with the given content.
 *
 * @param html the label content
 */
public Label htmlLabel(String html) {
    Label label = new Label();
    label.setContentMode(ContentMode.HTML);
    label.setValue(html);
    return label;
}

16 View Complete Implementation : A_CmsUpdateDialog.java
Copyright GNU Lesser General Public License v2.1
Author : alkacon
/**
 * Creates a new HTML-formatted label with the given content.
 *
 * @param html the label content
 * @return Label
 */
public Label htmlLabel(String html) {
    Label label = new Label();
    label.setContentMode(ContentMode.HTML);
    label.setValue(html);
    return label;
}