protected void showStubText() { if (reportBox.getOwnComponents().isEmpty()) { Label label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("showPivotTable.caption")); label.setAlignment(Alignment.MIDDLE_CENTER); label.setStyleName("h1"); reportBox.add(label); } } }
protected Label generateLabelByPermissionVariant(PermissionVariant permissionVariant) { if (permissionVariant == PermissionVariant.NOTSET) return null; String labelValue = "<span class=\"role-permission-" + permissionVariant.getColor() + "\">" + messages.getMessage(permissionVariant) + "</span>"; Label label = componentsFactory.createComponent(Label.class); label.setHtmlEnabled(true); label.setValue(labelValue); return label; } }
String localName = item.getLocalName(); selectedTargetCaption.setVisible(true); selectedTargetCaption.setValue(name); selectedTargetCaption.setDescription(name); selectedTargetLocalCaption.setVisible(true); selectedTargetLocalCaption.setValue(localName); selectedTargetLocalCaption.setDescription(localName); selectedTargetCaption.setVisible(false); selectedTargetCaption.setValue(""); selectedTargetLocalCaption.setVisible(false); selectedTargetLocalCaption.setValue("");
protected Label createEntityLabel(String caption) { Label entityLabel = componentsFactory.createComponent(Label.class); entityLabel.setValue(caption); entityLabel.setStyleName("h2"); entityLabel.setWidth("200px"); return entityLabel; }
protected Label createHitLabel(String caption) { Label<String> hitLabel = componentsFactory.createComponent(Label.class); hitLabel.setValue(caption); hitLabel.setHtmlEnabled(true); hitLabel.addStyleName("fts-hit"); return hitLabel; }
public Label createLabel(ReportInputParameter parameter, Field field) { Label label = componentsFactory.createComponent(Label.class); label.setAlignment(field instanceof TokenList ? Alignment.TOP_LEFT : Alignment.MIDDLE_LEFT); label.setWidth(Component.AUTO_SIZE); label.setValue(parameter.getLocName()); return label; }
@Override public void captionChanged() { captionLbl.setValue(condition.getLocCaption()); }
protected Label createNotFoundLabel() { Label label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("notFound")); label.setStyleName("h2"); return label; }
protected void addValueToLayout(final Object value, String str) { BoxLayout itemLayout = uiComponents.create(HBoxLayout.class); itemLayout.setId("itemLayout"); itemLayout.setSpacing(true); Label<String> itemLab = uiComponents.create(Label.NAME); if (options instanceof MapOptions) { //noinspection unchecked Map<String, Object> optionsMap = ((MapOptions) options).getItemsCollection(); str = optionsMap.entrySet() .stream() .filter(entry -> Objects.equals(entry.getValue(), value)) .findFirst() .get().getKey(); } itemLab.setValue(str); itemLayout.add(itemLab); itemLab.setAlignment(Alignment.MIDDLE_LEFT); LinkButton delItemBtn = uiComponents.create(LinkButton.class); delItemBtn.setIcon("icons/item-remove.png"); delItemBtn.addClickListener(e -> { valuesMap.remove(value); valuesLayout.remove(itemLayout); }); itemLayout.add(delItemBtn); if (BooleanUtils.isFalse(editable)) { delItemBtn.setEnabled(false); } valuesLayout.add(itemLayout); valuesMap.put(value, str); }
nameLab.setValue(item.getName()); nameLab.setAlignment(Alignment.MIDDLE_LEFT); grid.add(nameLab, 0, i); dash.setValue("-"); dash.setAlignment(Alignment.MIDDLE_LEFT); grid.add(dash, 1, i); dash.setValue("-"); dash.setAlignment(Alignment.MIDDLE_LEFT); grid.add(dash, 3, i); ackLab.setWidth("420px"); ackLab.setHtmlEnabled(true); ackLab.setValue(acknowledgements.toString()); scrollBox.add(ackLab);
protected void createDataComponents() { if (managedFields.isEmpty()) { infoLabel.setValue(getMessage("bulk.noEditableProperties")); applyButton.setVisible(false); return; label.setValue(field.getLocalizedName()); label.setAlignment(Alignment.TOP_LEFT); label.setStyleName("field-label"); if (AppConfig.getClientType() == ClientType.DESKTOP) { label.setHeight("25px");
initLoweredAttentionPatterns(); localJmxField.setValue(jmxControlAPI.getLocalNodeName()); })); logTailLabel.setSizeAuto(); logTailLabel.setHtmlEnabled(true); logTailLabel.setStyleName("c-log-content");
@Subscribe protected void onInit(InitEvent event) { Window window = getWindow(); Label<String> msgLabel = uiComponents.create(Label.TYPE_STRING); msgLabel.setAlignment(Component.Alignment.TOP_CENTER); msgLabel.addStyleName(HaloTheme.LABEL_H1); msgLabel.setValue(messages.formatMessage(NotFoundScreen.class, "notAssociatedRoute", requestedRoute)); window.add(msgLabel); window.setCaption(messages.formatMessage(NotFoundScreen.class, "tabCaption", requestedRoute)); } }
if (resultComponent.getValueSource() == null) { loadDatasource(resultComponent, element); resultComponent.setHtmlEnabled(Boolean.parseBoolean(htmlEnabled)); if (StringUtils.isNotEmpty(value)) { value = loadResourceString(value); resultComponent.setValue(value); loadCss(resultComponent, element); resultComponent.setFormatter(loadFormatter(element));
protected void setCommonEntityGridVisiblity(boolean visibleEntityGrid, boolean visibleEntitiesGrid) { entityParamLabel.setVisible(visibleEntityGrid); entityParamLookup.setVisible(visibleEntityGrid); entitiesParamLabel.setVisible(visibleEntitiesGrid); entitiesParamLookup.setVisible(visibleEntitiesGrid); } }
@Override public void init(Map<String, Object> params) { TO_ALL = messages.getMessage(getClass(), "messageWindow.toAll"); TO_SELECTED = messages.getMessage(getClass(), "messageWindow.toSelected"); allSessions = (Set) params.get("allSessions"); selectedSessions = (Set) params.get("selectedSessions"); Objects.requireNonNull(allSessions, "allSessions window parameter is not set"); Objects.requireNonNull(selectedSessions, "selectedSessions window parameter is not set"); List<String> whomOptions = new ArrayList<>(2); if (!selectedSessions.isEmpty()) { whomOptions.add(TO_SELECTED); } whomOptions.add(TO_ALL); whomOptionsGroup.setOptionsList(whomOptions); if (whomOptions.size() == 1) { whomOptionsGroup.setVisible(false); sendToAllLabel.setValue(TO_ALL); sendToAllLabel.setVisible(true); } whomOptionsGroup.setValue(whomOptions.get(0)); }
label.setStyleName("c-report-parameter-caption"); label.setVisible(visible); field.setVisible(visible);
@Override public void init(Map<String, Object> params) { super.init(params); if (exception != null) { Label<String> traceLabel = uiComponents.create(Label.NAME); traceLabel.setValue(getExceptionMessage(exception)); com.vaadin.ui.Label vaadinLbl = traceLabel.unwrap(com.vaadin.ui.Label.class); vaadinLbl.setContentMode(ContentMode.PREFORMATTED); resultLabel.setValue(getMessage("operationResult.exception")); resultContainer.add(traceLabel); } else if (result != null) { Label<String> valueHolder = uiComponents.create(Label.NAME); valueHolder.setValue(AttributeHelper.convertToString(result)); com.vaadin.ui.Label vaadinLbl = valueHolder.unwrap(com.vaadin.ui.Label.class); vaadinLbl.setContentMode(ContentMode.PREFORMATTED); resultLabel.setValue(getMessage("operationResult.result")); resultContainer.add(valueHolder); } else { resultLabel.setValue(getMessage("operationResult.void")); } }
protected void displayInstances(SearchResult searchResult, String entityName, CssLayout instancesLayout) { Set<SearchResultEntry> entries = searchResult.getEntries(entityName); for (SearchResultEntry entry : entries) { Button instanceBtn = createInstanceButton(entityName, entry); instanceBtn.setAlignment(Alignment.MIDDLE_LEFT); instanceBtn.addStyleName("c-fts-entity"); instancesLayout.add(instanceBtn); HitInfo hi = searchResult.getHitInfo(entry.getId(), entityName); if (hi != null) { List<String> list = new ArrayList<>(hi.getHits().size()); for (Map.Entry<String, String> hitEntry : hi.getHits().entrySet()) { String hitProperty = hitEntry.getKey(); list.add(ftsService.getHitPropertyCaption(entityName, hitProperty) + ": " + hitEntry.getValue()); } Collections.sort(list); for (String caption : list) { Label hitLabel = createHitLabel(caption); hitLabel.addStyleName("c-fts-hit"); hitLabel.addStyleName("fts-hit"); hitLabel.setAlignment(Alignment.MIDDLE_LEFT); instancesLayout.add(hitLabel); } } } }
public void setControlVisible(boolean visible) { controlVisible = visible; operationLabel.setVisible(visible); allowChecker.setVisible(visible); allowChecker.setDescription(operationLabel.getValue()); denyChecker.setVisible(visible); denyChecker.setDescription(operationLabel.getValue()); }