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 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 void setIds() { this.setId(ID.getId(Optional.empty(), this)); label.setId(ID.getId(Optional.empty(), this, label)); }
@Override public void setIds() { super.setIds(); grid.setId(ID.getId(Optional.empty(), this, grid)); label.setId(ID.getId(Optional.empty(), this, label)); }
private void setIds() { setId(ID.getId(Optional.empty(), this)); login_logout_Button.setId(ID.getId(Optional.empty(), this, login_logout_Button)); usernameLabel.setId(ID.getId(Optional.empty(), this, usernameLabel)); }
Label label=new Label(msg); label.getStylesheets().add("sample/styles/send.css"); label.setId("send"); HBox hBox=new HBox(); hBox.getChildren().add(label); hBox.setAlignment(Pos.BASELINE_LEFT); vBox.getChildren().add(hBox); vBox.setSpacing(10);
@Override protected void setIds() { super.setIds(); submitButton.setId(ID.getId(Optional.empty(), this, submitButton)); submitButton.setClickShortcut(ShortcutAction.KeyCode.ENTER); submitButton.addStyleName(ValoTheme.BUTTON_PRIMARY); usernameBox.setId(ID.getId(Optional.of("username"), this, usernameBox)); passwordBox.setId(ID.getId(Optional.of("password"), this, passwordBox)); statusMsgLabel.setId(ID.getId(Optional.of("status"), this, statusMsgLabel)); label.setId(ID.getId(Optional.of("label"), this, label)); }
protected void updateDescriptionLayout(final String description) { descriptionLayout.removeAllComponents(); final Label descLabel = SPUIComponentProvider.createNameValueLabel("", description == null ? "" : description); /** * By default text will be truncated based on layout width. So removing * it as we need full description. */ descLabel.removeStyleName("label-style"); descLabel.setId(UIComponentIdProvider.DETAILS_DESCRIPTION_LABEL_ID); descriptionLayout.addComponent(descLabel); }
private static Label createStatusIcon() { final Label statusIcon = new Label(); statusIcon.setImmediate(true); statusIcon.setContentMode(ContentMode.HTML); statusIcon.setSizeFull(); setInitialStatusIconStyle(statusIcon); statusIcon.setId(UIComponentIdProvider.VALIDATION_STATUS_ICON_ID); return statusIcon; }
private void build() { HorizontalLayout layout = new HorizontalLayout(); display = new Label(translate.from(LabelKey.Message_Bar)); display.setImmediate(true); layout.addComponent(display); this.setContent(layout); display.setId(ID.getId(Optional.empty(), this, display)); }
private static Label getStatusCountLabel() { final Label countLabel = new Label(); countLabel.setImmediate(true); countLabel.addStyleName("bulk-upload-label"); countLabel.setVisible(false); countLabel.setCaptionAsHtml(true); countLabel.setId(UIComponentIdProvider.BULK_UPLOAD_COUNT); return countLabel; }
private static Label createStatusIcon() { final Label statusIcon = new Label(); statusIcon.setImmediate(true); statusIcon.setContentMode(ContentMode.HTML); statusIcon.setSizeFull(); setInitialStatusIconStyle(statusIcon); statusIcon.setId(UIComponentIdProvider.VALIDATION_STATUS_ICON_ID); return statusIcon; }
private static Label getStatusCountLabel() { final Label countLabel = new Label(); countLabel.setImmediate(true); countLabel.addStyleName("bulk-upload-label"); countLabel.setVisible(false); countLabel.setCaptionAsHtml(true); countLabel.setId(UIComponentIdProvider.BULK_UPLOAD_COUNT); return countLabel; }
public BasicTestUI() { label.setId(LABEL_ID); label.setValue(valueOf(counter)); button.setId(BUTTON_ID); button.setCaption(BUTTON_ID); button.addClickListener(e -> label.setValue(valueOf(++counter))); setCompositionRoot(new VerticalLayout(button, label)); }
private static VerticalLayout createSoftwareModuleLayout(final String softwareModuleName) { final VerticalLayout verticalLayout = new VerticalLayout(); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); final Label softwareModule = HawkbitCommonUtil.getFormatedLabel(""); softwareModule.setValue(softwareModuleName); softwareModule.setDescription(softwareModuleName); softwareModule.setId(softwareModuleName + "-label"); horizontalLayout.addComponent(softwareModule); horizontalLayout.setExpandRatio(softwareModule, 1F); verticalLayout.addComponent(horizontalLayout); return verticalLayout; }
private static VerticalLayout createSoftwareModuleLayout(final String softwareModuleName) { final VerticalLayout verticalLayout = new VerticalLayout(); final HorizontalLayout horizontalLayout = new HorizontalLayout(); horizontalLayout.setSizeFull(); final Label softwareModule = HawkbitCommonUtil.getFormatedLabel(""); softwareModule.setValue(softwareModuleName); softwareModule.setDescription(softwareModuleName); softwareModule.setId(softwareModuleName + "-label"); horizontalLayout.addComponent(softwareModule); horizontalLayout.setExpandRatio(softwareModule, 1F); verticalLayout.addComponent(horizontalLayout); return verticalLayout; }
private void updateDistributionSetDetailsLayout(final String type, final Boolean isMigrationRequired) { final VerticalLayout detailsTabLayout = getDetailsLayout(); detailsTabLayout.removeAllComponents(); final Label typeLabel = SPUIComponentProvider .createNameValueLabel(getI18n().getMessage("label.dist.details.type"), type == null ? "" : type); typeLabel.setId(UIComponentIdProvider.DETAILS_TYPE_LABEL_ID); detailsTabLayout.addComponent(typeLabel); detailsTabLayout.addComponent( SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("checkbox.dist.migration.required"), getMigrationRequiredValue(isMigrationRequired))); }
private Component buildDisclaimer() { final HorizontalLayout fields = new HorizontalLayout(); fields.setSpacing(true); fields.addStyleName("disclaimer"); final Label disclaimer = new Label(uiProperties.getDemo().getDisclaimer(), ContentMode.HTML); disclaimer.setCaption(i18n.getMessage("label.login.disclaimer")); disclaimer.setIcon(FontAwesome.EXCLAMATION_CIRCLE); disclaimer.setId("login-disclaimer"); disclaimer.setWidth("525px"); fields.addComponent(disclaimer); return fields; }
private Component buildDisclaimer() { final HorizontalLayout fields = new HorizontalLayout(); fields.setSpacing(true); fields.addStyleName("disclaimer"); final Label disclaimer = new Label(uiProperties.getDemo().getDisclaimer(), ContentMode.HTML); disclaimer.setCaption(i18n.getMessage("label.login.disclaimer")); disclaimer.setIcon(FontAwesome.EXCLAMATION_CIRCLE); disclaimer.setId("login-disclaimer"); disclaimer.setWidth("525px"); fields.addComponent(disclaimer); return fields; }
private void updateDistributionSetDetailsLayout(final String type, final Boolean isMigrationRequired) { final VerticalLayout detailsTabLayout = getDetailsLayout(); detailsTabLayout.removeAllComponents(); final Label typeLabel = SPUIComponentProvider .createNameValueLabel(getI18n().getMessage("label.dist.details.type"), type == null ? "" : type); typeLabel.setId(UIComponentIdProvider.DETAILS_TYPE_LABEL_ID); detailsTabLayout.addComponent(typeLabel); detailsTabLayout.addComponent( SPUIComponentProvider.createNameValueLabel(getI18n().getMessage("checkbox.dist.migration.required"), getMigrationRequiredValue(isMigrationRequired))); }