@Override public Object generateCell(Table table, final Object itemId, Object columnId) { Label label = new Label((String) itemId); label.setSizeFull(); label.addStyleName("white"); return label; } });
protected void initLabel(String description) { descriptionLabel = new Label(description, Label.CONTENT_XHTML); descriptionLabel.setSizeFull(); layout.addComponent(descriptionLabel, 0, 0 , 1, 0); layout.setRowExpandRatio(0, 1.0f); } }
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; } });
/** * Get formatted label.Appends ellipses if content does not fit the label. * * @param labelContent * content * @return Label */ public static Label getFormatedLabel(final String labelContent) { final Label labelValue = new Label(labelContent, ContentMode.HTML); labelValue.setSizeFull(); labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE); labelValue.addStyleName("label-style"); return labelValue; }
/** * Get formatted label.Appends ellipses if content does not fit the label. * * @param labelContent * content * @return Label */ public static Label getFormatedLabel(final String labelContent) { final Label labelValue = new Label(labelContent, ContentMode.HTML); labelValue.setSizeFull(); labelValue.addStyleName(SPUIDefinitions.TEXT_STYLE); labelValue.addStyleName("label-style"); return labelValue; }
public NlsHelpPanel() { text = new Label(); text.setCaptionAsHtml(true); addComponent(text); text.setSizeFull(); setSizeFull(); }
private static Label createUsernameLabel(final String label, final String username) { String loadAndFormatUsername = ""; if (!StringUtils.isEmpty(username)) { loadAndFormatUsername = UserDetailsFormatter.loadAndFormatUsername(username); } final Label nameValueLabel = new Label(getBoldHTMLText(label) + loadAndFormatUsername, ContentMode.HTML); nameValueLabel.setSizeFull(); nameValueLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); nameValueLabel.addStyleName("label-style"); nameValueLabel.setDescription(loadAndFormatUsername); return nameValueLabel; }
private static Label createUsernameLabel(final String label, final String username) { String loadAndFormatUsername = ""; if (!StringUtils.isEmpty(username)) { loadAndFormatUsername = UserDetailsFormatter.loadAndFormatUsername(username); } final Label nameValueLabel = new Label(getBoldHTMLText(label) + loadAndFormatUsername, ContentMode.HTML); nameValueLabel.setSizeFull(); nameValueLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); nameValueLabel.addStyleName("label-style"); nameValueLabel.setDescription(loadAndFormatUsername); return nameValueLabel; }
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 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 Component buildVersionInfo() { final Label label = new Label(); label.setSizeFull(); label.setStyleName("version-layout"); label.setValue(serverProperties.getBuild().getVersion()); return label; }
private Component buildVersionInfo() { final Label label = new Label(); label.setSizeFull(); label.setStyleName("version-layout"); label.setValue(serverProperties.getBuild().getVersion()); return label; }
protected void initRelatedContentTitle() { Label title = new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.TASK_RELATED_CONTENT)); title.addStyleName(ExplorerLayout.STYLE_H3); title.setSizeFull(); relatedContentLayout.addComponent(title); }
/** * Method to CreateName value labels. * * @param label * as string * @param values * as string * @return Label */ public static Label createNameValueLabel(final String label, final String... values) { final String valueStr = StringUtils.arrayToDelimitedString(values, " "); final Label nameValueLabel = new Label(getBoldHTMLText(label) + valueStr, ContentMode.HTML); nameValueLabel.setSizeFull(); nameValueLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); nameValueLabel.addStyleName("label-style"); return nameValueLabel; }
/** * Method to CreateName value labels. * * @param label * as string * @param values * as string * @return Label */ public static Label createNameValueLabel(final String label, final String... values) { final String valueStr = StringUtils.arrayToDelimitedString(values, " "); final Label nameValueLabel = new Label(getBoldHTMLText(label) + valueStr, ContentMode.HTML); nameValueLabel.setSizeFull(); nameValueLabel.addStyleName(SPUIDefinitions.TEXT_STYLE); nameValueLabel.addStyleName("label-style"); return nameValueLabel; }
@Override public void doBuild() { label = new Label("This is the " + this.getClass() .getSimpleName()); label.setHeight("100px"); grid = new GridLayout(3, 3); grid.addComponent(label, 1, 1); grid.setSizeFull(); grid.setColumnExpandRatio(0, 0.33f); grid.setColumnExpandRatio(1, 0.33f); grid.setColumnExpandRatio(2, 0.33f); grid.setRowExpandRatio(0, 0.4f); grid.setRowExpandRatio(1, 0.2f); grid.setRowExpandRatio(2, 0.4f); label.setSizeFull(); setRootComponent(grid); }
@Override public void doBuild(ViewChangeBusMessage busMessage) { label = new Label("This is the " + this.getClass() .getSimpleName()); label.setHeight("100px"); grid = new GridLayout(3, 3); grid.addComponent(label, 1, 1); grid.setSizeFull(); grid.setColumnExpandRatio(0, 0.33f); grid.setColumnExpandRatio(1, 0.33f); grid.setColumnExpandRatio(2, 0.33f); grid.setRowExpandRatio(0, 0.4f); grid.setRowExpandRatio(1, 0.2f); grid.setRowExpandRatio(2, 0.4f); label.setSizeFull(); setRootComponent(grid); }
private void createComponents(final String labelSoftwareModule) { titleOfArtifactDetails = new LabelBuilder().id(UIComponentIdProvider.ARTIFACT_DETAILS_HEADER_LABEL_ID) .name(HawkbitCommonUtil.getArtifactoryDetailsLabelId(labelSoftwareModule, i18n)).buildCaptionLabel(); titleOfArtifactDetails.setContentMode(ContentMode.HTML); titleOfArtifactDetails.setSizeFull(); titleOfArtifactDetails.setImmediate(true); maxMinButton = createMaxMinButton(); artifactDetailsTable = createArtifactDetailsTable(); artifactDetailsTable.setContainerDataSource(createArtifactLazyQueryContainer()); addGeneratedColumn(artifactDetailsTable); if (!readOnly) { addGeneratedColumnButton(artifactDetailsTable); } setTableColumnDetails(artifactDetailsTable); }
private void createComponents(final String labelSoftwareModule) { titleOfArtifactDetails = new LabelBuilder().id(UIComponentIdProvider.ARTIFACT_DETAILS_HEADER_LABEL_ID) .name(HawkbitCommonUtil.getArtifactoryDetailsLabelId(labelSoftwareModule, i18n)).buildCaptionLabel(); titleOfArtifactDetails.setContentMode(ContentMode.HTML); titleOfArtifactDetails.setSizeFull(); titleOfArtifactDetails.setImmediate(true); maxMinButton = createMaxMinButton(); artifactDetailsTable = createArtifactDetailsTable(); artifactDetailsTable.setContainerDataSource(createArtifactLazyQueryContainer()); addGeneratedColumn(artifactDetailsTable); if (!readOnly) { addGeneratedColumnButton(artifactDetailsTable); } setTableColumnDetails(artifactDetailsTable); }
processTitle.setSizeFull(); actionsContainer.addComponent(processTitle); actionsContainer.setComponentAlignment(processTitle, Alignment.MIDDLE_LEFT);