@Override public void captionChanged() { captionLbl.setValue(condition.getLocCaption()); }
protected void showProgress(Number processedValue) { double value = processedValue.doubleValue() / totalProgress.doubleValue(); taskProgressBar.setValue(value); if (!percentProgress) { progressText.setValue(formatMessage("backgroundWorkProgress.progressTextFormat", processedValue, totalProgress)); } else { int percentValue = (int) Math.ceil(value * 100); progressText.setValue(formatMessage("backgroundWorkProgress.progressPercentFormat", percentValue)); } } }
protected void initTimeZoneColumn() { usersTable.addGeneratedColumn("timeZone", entity -> { Label<String> label = uiComponents.create(Label.TYPE_DEFAULT); if (Boolean.TRUE.equals(entity.getTimeZoneAuto())) { label.setValue(messages.getMainMessage("timeZone.auto")); } else if (entity.getTimeZone() != null) { label.setValue(entity.getTimeZone()); } return label; }); }
protected Label createEntityLabel(String caption) { Label entityLabel = componentsFactory.createComponent(Label.class); entityLabel.setValue(caption); entityLabel.setStyleName("h2"); entityLabel.setWidth("200px"); return entityLabel; }
@Override protected Component createComponent() { ComponentsFactory componentsFactory = AppBeans.get(ComponentsFactory.class); Label label = componentsFactory.createComponent(Label.class); label.setValue(condition.getOperationCaption()); return label; }
protected Label createNotFoundLabel() { Label label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("notFound")); label.setStyleName("h2"); return label; }
protected Label createHitLabel(String caption) { Label<String> hitLabel = componentsFactory.createComponent(Label.class); hitLabel.setValue(caption); hitLabel.setHtmlEnabled(true); hitLabel.addStyleName("fts-hit"); return hitLabel; }
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; } }
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; }
protected void refreshLogFileNames(JmxRemoteLoggingAPI.LoggingHostInfo hostInfo) { // try to keep previously selected file name String selectedFileName = logFileNameField.getValue(); List<String> logFiles = hostInfo.getLogFileNames(); logFileNameField.setValue(null); logFileNameField.setOptionsList(logFiles); autoRefreshCheck.setValue(false); if (selectedFileName != null && logFiles.contains(selectedFileName)) { logFileNameField.setValue(selectedFileName); } logTailLabel.setValue(""); }
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 void showDiagramStubText() { if (chartBox.getOwnComponents().isEmpty()) { Label label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("showChart.caption")); label.setAlignment(Alignment.MIDDLE_CENTER); label.setStyleName("h1"); chartBox.add(label); } }
private BoxLayout createFirstRowAttrsLayout() { BoxLayout firstRowAttrsLayout = wizard.componentsFactory.createComponent(HBoxLayout.class); firstRowAttrsLayout.setSpacing(true); Label regionLbl = wizard.componentsFactory.createComponent(Label.class); regionLbl.setStyleName(BOLD_LABEL_STYLE); regionLbl.setValue(wizard.getMessage("region")); Label regionValueLbl = wizard.componentsFactory.createComponent(Label.class); regionValueLbl.setValue(currentReportRegionGeneratedColumn.getName()); regionValueLbl.setWidth(WIDTH_PERCENT_100); firstRowAttrsLayout.add(regionLbl); firstRowAttrsLayout.add(regionValueLbl); return firstRowAttrsLayout; }
protected void initNoSearchTerm() { setCaption(getMessage("caption")); Label<String> label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("noSearchTerm")); label.setStyleName("h2"); contentBox.add(label); }
@Override public void init(Map<String, Object> params) { super.init(params); initWindowActions(); fileUpload.addFileUploadSucceedListener(e -> { fileName.setValue(fileUpload.getFileName()); }); importRoles.setValue(Boolean.TRUE); if (AppConfig.getClientType() != ClientType.WEB) { dropZone.setVisible(false); } }
protected void showChartsNotIncluded() { reportLookup.setEditable(false); chartBox.removeAll(); Label label = componentsFactory.createComponent(Label.class); label.setValue(getMessage("showChart.noChartComponent")); label.setAlignment(Alignment.MIDDLE_CENTER); label.setStyleName("h1"); chartBox.add(label); }
@Override public void init(Map<String, Object> params) { super.init(params); sessionsTable.setTextSelectionEnabled(true); sessionsDs.addCollectionChangeListener(e -> { String time = Datatypes.getNN(Date.class).format(sessionsDs.getUpdateTs(), userSessionSource.getLocale()); lastUpdateTsLab.setValue(time); }); addAction(refreshAction); }
@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)); } }