本文整理了Java中com.vaadin.ui.Label.setCaption()
方法的一些代码示例,展示了Label.setCaption()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setCaption()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:setCaption
暂无
代码示例来源:origin: org.opennms.features/vaadin-surveillance-views
/**
* Sets the caption text.
*
* @param text the text to be used
*/
public void setCaptionText(String text) {
m_label.setCaption(text);
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
@Override
protected void setValue(Object value) throws MException {
// DataSource ds = getForm().getDataSource();
// ((Link)getComponentEditor()).setTargetName("_blank");
// ((Link)getComponentEditor()).setResource(new ExternalResource( MCast.toString(value) ));
// ((Link)getComponentEditor()).setCaption( ds.getString(this, "label", getConfig().getString("label", "label=Link") ) );
((Label)getComponentEditor()).setCaptionAsHtml( getConfig().getBoolean("html", true) );
if (value == null)
((Label)getComponentEditor()).setCaption("");
else {
((Label)getComponentEditor()).setCaption(String.valueOf(value));
}
this.value = value;
}
代码示例来源:origin: org.opennms.features.vaadin-components/core
public static Label createLabel(String caption, String content) {
Label label = new Label(content);
label.setCaption(caption);
return label;
}
代码示例来源:origin: eclipse/hawkbit
private void setCaptionDetails() {
headerCaption.setCaption(rolloutUIState.getRolloutName().orElse(""));
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void setCaptionDetails() {
headerCaption.setCaption(rolloutUIState.getRolloutName().orElse(""));
}
代码示例来源:origin: at.chrl/chrl-spring
@Override
public void buttonClick(ClickEvent event) {
clickCount++;
String msg = "Hello Vaadin - " + clickCount + " clicks!";
clickCountLabel.setCaption("Click count: " + clickCount);
content.addComponent(new Label(msg));
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(ClickEvent event)
{
notifierService.start();
layout.removeComponent(startButton);
layout.addComponent(stopButton, 1, 3);
layout.setComponentAlignment(stopButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(runningIcon.getHtml());
notificationIntervalLabel.setCaption(Integer.toString(notifierService.getNotificationInterval()));
}
});
代码示例来源:origin: info.magnolia.contacts/magnolia-contacts
@Override
protected Component createDetailComponent(String propertyName, Object value) {
Label label = new Label("", ContentMode.TEXT);
label.setCaption(getI18n().translate("contacts.components.preview." + propertyName) + ": ");
label.setValue(String.valueOf(value));
return label;
}
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
@Override
public void afterViewChange(final ViewChangeEvent event) {
final DashboardMenuItem view = dashboardMenu.getByViewName(event.getViewName());
dashboardMenu.postViewChange(new PostViewChangeEvent(view));
if (view == null) {
viewTitle.setCaption(null);
return;
}
viewTitle.setCaption(view.getDashboardCaptionLong());
notificationUnreadButton.setCurrentView(event.getNewView());
}
});
代码示例来源:origin: eclipse/hawkbit
@Override
public void afterViewChange(final ViewChangeEvent event) {
final DashboardMenuItem view = dashboardMenu.getByViewName(event.getViewName());
dashboardMenu.postViewChange(new PostViewChangeEvent(view));
if (view == null) {
viewTitle.setCaption(null);
return;
}
viewTitle.setCaption(view.getDashboardCaptionLong());
notificationUnreadButton.setCurrentView(event.getNewView());
}
});
代码示例来源:origin: org.activiti/activiti-explorer
public void uploadFinished(FinishedEvent event) {
// Update UI
if(getAttachmentName() == null || "".equals(getAttachmentName())) {
setAttachmentName(getFriendlyName(fileName));
}
fileUploaded = true;
successIndicator.setVisible(true);
successIndicator.setCaption(i18nManager.getMessage(Messages.RELATED_CONTENT_TYPE_FILE_UPLOADED, fileName));
form.setComponentError(null);
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(Button.ClickEvent event)
{
start();
layout.removeComponent(startButton);
layout.addComponent(stopButton, 1, 3);
layout.setComponentAlignment(stopButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(runningIcon.getHtml());
refresh();
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(Button.ClickEvent event)
{
stop();
layout.removeComponent(stopButton);
layout.addComponent(startButton, 1, 3);
layout.setComponentAlignment(startButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(stoppedIcon.getHtml());
refresh();
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(Button.ClickEvent event)
{
start();
layout.removeComponent(startButton);
layout.addComponent(stopButton, 1, 3);
layout.setComponentAlignment(stopButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(runningIcon.getHtml());
refresh();
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(ClickEvent event)
{
notifierService.stop();
layout.removeComponent(stopButton);
layout.addComponent(startButton, 1, 3);
layout.setComponentAlignment(startButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(stoppedIcon.getHtml());
}
});
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
public void buttonClick(Button.ClickEvent event)
{
stop();
layout.removeComponent(stopButton);
layout.addComponent(startButton, 1, 3);
layout.setComponentAlignment(startButton, Alignment.MIDDLE_LEFT);
statusIconLabel.setCaption(stoppedIcon.getHtml());
refresh();
}
});
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
/**
* Actions once bulk upload is completed.
*/
public void onUploadCompletion() {
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
final String targetCountLabel = getFormattedCountLabelValue(targetBulkUpload.getSucessfulUploadCount(),
targetBulkUpload.getFailedUploadCount());
getTargetsCountLabel().setVisible(true);
getTargetsCountLabel().setCaption(targetCountLabel);
closeButton.setEnabled(true);
minimizeButton.setEnabled(false);
}
代码示例来源:origin: eclipse/hawkbit
/**
* Actions once bulk upload is completed.
*/
public void onUploadCompletion() {
final TargetBulkUpload targetBulkUpload = managementUIState.getTargetTableFilters().getBulkUpload();
final String targetCountLabel = getFormattedCountLabelValue(targetBulkUpload.getSucessfulUploadCount(),
targetBulkUpload.getFailedUploadCount());
getTargetsCountLabel().setVisible(true);
getTargetsCountLabel().setCaption(targetCountLabel);
closeButton.setEnabled(true);
minimizeButton.setEnabled(false);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
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;
}
代码示例来源:origin: eclipse/hawkbit
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;
}
内容来源于网络,如有侵权,请联系作者删除!