private static Label createConfirmationQuestion(final String question) { final Label questionLbl = new Label(String.format("<p>%s</p>", question.replaceAll("\n", "<br/>")), ContentMode.HTML); questionLbl.addStyleName(SPUIStyleDefinitions.CONFIRMBOX_QUESTION_LABEL); return questionLbl; }
private void updateAttributesLabelsList(final VerticalLayout attributesLayout, final Map<String, String> attributes) { for (final Map.Entry<String, String> entry : attributes.entrySet()) { final Label conAttributeLabel = SPUIComponentProvider.createNameValueLabel(entry.getKey().concat(" : "), entry.getValue() == null ? "" : entry.getValue()); conAttributeLabel.setDescription(entry.getKey().concat(" : ") + entry.getValue()); conAttributeLabel.addStyleName("label-style"); attributesLayout.addComponent(conAttributeLabel); } }
protected void addDescription() { descriptionLabel = new Label(); descriptionLabel.addStyleName(Reindeer.LABEL_SMALL); descriptionLabel.addStyleName(ExplorerLayout.STYLE_DEPLOYMENT_UPLOAD_DESCRIPTION); descriptionLabel.setVisible(false); addComponent(descriptionLabel); }
protected void initTitle() { Label title = new Label(); title.addStyleName(Reindeer.LABEL_H1); if (ExplorerApp.get().getEnvironment().equals(Environments.ALFRESCO)) { title.addStyleName(ExplorerLayout.STYLE_WORKFLOW_CONSOLE_LOGO); } else { title.addStyleName(ExplorerLayout.STYLE_APPLICATION_LOGO); } addComponent(title); setExpandRatio(title, 1.0f); }
private Label createLabel() { final Label label = new Label(name); label.setVisible(visible); final StringBuilder style = new StringBuilder(ValoTheme.LABEL_SMALL); style.append(' '); style.append(ValoTheme.LABEL_BOLD); label.addStyleName(style.toString()); if (id != null) { label.setId(id); } return label; }
private Component buildUnsupportedMessage() { final Label label = new Label(i18n.getMessage("label.unsupported.browser.ie")); label.addStyleName(ValoTheme.LABEL_FAILURE); return label; }
private static Label getPercentHintLabel() { final Label percentSymbol = new Label("%"); percentSymbol.addStyleName(ValoTheme.LABEL_TINY + " " + ValoTheme.LABEL_BOLD); percentSymbol.setSizeUndefined(); return percentSymbol; }
private Component buildUnsupportedMessage() { final Label label = new Label(i18n.getMessage("label.unsupported.browser.ie")); label.addStyleName(ValoTheme.LABEL_FAILURE); return label; }
private void createUnreadMessagesLayout() { final VerticalLayout notificationsLayout = new VerticalLayout(); notificationsLayout.setMargin(true); notificationsLayout.setSpacing(true); final Label title = new Label(i18n.getMessage(TITLE)); title.addStyleName(ValoTheme.LABEL_H3); title.addStyleName(ValoTheme.LABEL_NO_MARGIN); notificationsLayout.addComponent(title); unreadNotifications.values().stream().forEach(value -> createNotification(notificationsLayout, value)); notificationsWindow.setContent(notificationsLayout); }
/** * @see org.opencms.ui.apps.I_CmsWorkplaceApp#initUI(org.opencms.ui.apps.I_CmsAppUIContext) */ public void initUI(I_CmsAppUIContext context) { Label label = new Label(CmsVaadinUtils.getMessageText(Messages.GUI_APP_NOT_AVAILABLE_0)); label.addStyleName(ValoTheme.LABEL_H2); label.addStyleName(OpenCmsTheme.LABEL_ERROR); VerticalLayout content = new VerticalLayout(); content.setMargin(true); content.addComponent(label); context.setAppContent(content); }
protected void addTitle() { Label eventTitle = new Label(i18nManager.getMessage(Messages.EVENT_TITLE)); eventTitle.addStyleName(Reindeer.LABEL_H2); addComponent(eventTitle); }
protected void initEventTitle(HorizontalLayout eventsHeader) { Label usersHeader = new Label(i18nManager.getMessage(Messages.ADMIN_DEFINITIONS)); usersHeader.addStyleName(ExplorerLayout.STYLE_H3); eventsHeader.addComponent(usersHeader); }
public Object generateCell(Table source, final Object itemId, Object columnId) { final Optional<RowDef> rowDef = view.getRowDef((String) itemId); final Optional<ColumnDef> columnDef = view.getColumnDef((String) columnId); int rowIndex = view.getRows().indexOf(rowDef.orElse(null)); int colIndex = view.getColumns().indexOf(columnDef.orElse(null)); SurveillanceStatus surveillanceStatus = m_cells[rowIndex][colIndex]; Label label = new Label(surveillanceStatus.getDownEntityCount() + " of " + surveillanceStatus.getTotalEntityCount()); label.setSizeFull(); label.addStyleName(surveillanceStatus.getStatus().toLowerCase()); return label; } });
public Label getHeaderLabel() { I18NSource messages = I18NSource.ThreadUtil.getThreadI18nSource(); Label headerLabel = new Label(); if (stepName != null && !stepName.isEmpty()) { headerLabel.setValue(messages.getMessage("userStep.stepName", new Object[] { stepName })); } else { headerLabel.setValue(messages.getMessage("userStep.noStepName")); } headerLabel.addStyleName("h1"); return headerLabel; }
protected void initTitle(HorizontalLayout headerLayout) { title = new Label(i18nManager.getMessage(Messages.TASK_PEOPLE)); title.addStyleName(ExplorerLayout.STYLE_H3); title.setWidth(100, UNITS_PERCENTAGE); headerLayout.addComponent(title); headerLayout.setExpandRatio(title, 1.0f); }
protected void addSimpleRow(String labelMessageKey, String content) { addLabel(labelMessageKey); Label subjectLabel = new Label(content); subjectLabel.setSizeUndefined(); subjectLabel.addStyleName(ExplorerLayout.STYLE_LABEL_BOLD); gridLayout.addComponent(subjectLabel); gridLayout.setComponentAlignment(subjectLabel, Alignment.MIDDLE_LEFT); }
protected void addConvertWarning() { Label convertLabel = new Label(i18nManager.getMessage(Messages.PROCESS_CONVERT_POPUP_MESSAGE)); convertLabel.addStyleName(Reindeer.LABEL_SMALL); addComponent(convertLabel); // Some empty space Label emptySpace = new Label(" ", Label.CONTENT_XHTML); addComponent(emptySpace); }
private static Label createGroupTargetsLabel() { final Label label = new LabelBuilder().visible(false).name("").buildLabel(); label.addStyleName("rollout-group-count"); label.setSizeUndefined(); return label; }
private static Label createCountLabel() { final Label groupSize = new LabelBuilder().visible(false).name("").buildLabel(); groupSize.addStyleName(ValoTheme.LABEL_TINY + " " + "rollout-target-count-message"); groupSize.setImmediate(true); groupSize.setSizeUndefined(); return groupSize; }
protected void addProfileInputField(GridLayout layout, String name, AbstractField inputField, String inputFieldValue) { Label label = new Label(name + ": "); label.addStyleName(ExplorerLayout.STYLE_PROFILE_FIELD); label.setSizeUndefined(); layout.addComponent(label); layout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); if (inputFieldValue != null) { inputField.setValue(inputFieldValue); } layout.addComponent(inputField); layout.setComponentAlignment(inputField, Alignment.MIDDLE_LEFT); }