本文整理了Java中com.vaadin.ui.Label.setSizeFull()
方法的一些代码示例,展示了Label.setSizeFull()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setSizeFull()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:setSizeFull
暂无
代码示例来源:origin: org.opennms.features/vaadin-surveillance-views
@Override
public Object generateCell(Table table, final Object itemId, Object columnId) {
Label label = new Label((String) itemId);
label.setSizeFull();
label.addStyleName("white");
return label;
}
});
代码示例来源:origin: org.activiti/activiti-explorer
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);
}
}
代码示例来源:origin: org.opennms.features/vaadin-surveillance-views
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;
}
});
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* 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;
}
代码示例来源:origin: eclipse/hawkbit
/**
* 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;
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
public NlsHelpPanel() {
text = new Label();
text.setCaptionAsHtml(true);
addComponent(text);
text.setSizeFull();
setSizeFull();
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
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;
}
代码示例来源:origin: eclipse/hawkbit
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;
}
代码示例来源:origin: eclipse/hawkbit
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;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
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;
}
代码示例来源:origin: eclipse/hawkbit
private Component buildVersionInfo() {
final Label label = new Label();
label.setSizeFull();
label.setStyleName("version-layout");
label.setValue(serverProperties.getBuild().getVersion());
return label;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private Component buildVersionInfo() {
final Label label = new Label();
label.setSizeFull();
label.setStyleName("version-layout");
label.setValue(serverProperties.getBuild().getVersion());
return label;
}
代码示例来源:origin: org.activiti/activiti-explorer
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);
}
代码示例来源:origin: eclipse/hawkbit
/**
* 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;
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* 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;
}
代码示例来源:origin: KrailOrg/krail
@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);
}
代码示例来源:origin: uk.q3c.krail/krail
@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);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
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);
}
代码示例来源:origin: eclipse/hawkbit
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);
}
代码示例来源:origin: org.activiti/activiti-explorer
processTitle.setSizeFull();
actionsContainer.addComponent(processTitle);
actionsContainer.setComponentAlignment(processTitle, Alignment.MIDDLE_LEFT);
内容来源于网络,如有侵权,请联系作者删除!