本文整理了Java中com.vaadin.v7.ui.Label.setDescription()
方法的一些代码示例,展示了Label.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setDescription()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Label
类名称:Label
方法名:setDescription
暂无
代码示例来源:origin: OpenNMS/opennms
private Component createComponent() {
Label label = new Label("Simulation Mode Enabled");
label.setDescription("Simulation Mode is enabled");
label.setIcon(FontAwesome.EXCLAMATION_TRIANGLE);
label.addStyleName("warning");
HorizontalLayout layout = new HorizontalLayout();
layout.addComponent(label);
layout.addStyleName("simulation");
return layout;
}
代码示例来源:origin: OpenNMS/opennms
@Override
public Object generateCell(Table source, Object itemId, Object columnId) {
final HorizontalLayout layout = new HorizontalLayout();
final BusinessServiceStateMachine stateMachine = businessServiceManager.getStateMachine();
final BusinessService businessService = getItem(itemId).getBean().getBusinessService();
final Status status = stateMachine.getOperationalStatus(businessService);
if (status != null) {
final String topologyLink = new TopologyLinkBuilder()
.focus(businessService.getId().toString())
.szl(1)
.layout(Layout.HIERARCHY)
.provider(TopologyProvider.BUSINESS_SERVICE)
.getLink();
// Generate the link
final Link link = new Link("View in Topology UI", new ExternalResource(topologyLink));
link.setIcon(FontAwesome.EXTERNAL_LINK_SQUARE);
// This app is typically access in an iframe, so we open the URL in a new window/tab
link.setTargetName("_blank");
layout.addComponent(link);
layout.setComponentAlignment(link, Alignment.MIDDLE_CENTER);
} else {
Label label = new Label("N/A");
label.setDescription("Try reloading the daemon and refreshing the table.");
label.setWidth(null);
layout.addComponent(label);
}
return layout;
}
});
代码示例来源:origin: OpenNMS/opennms
public ConfirmationDialog(String caption, String description) {
setCaption(caption);
setModal(true);
setResizable(false);
setClosable(false);
setWidth(400, Unit.PIXELS);
setHeight(200, Unit.PIXELS);
addCloseListener(this);
okButton = UIHelper.createButton("ok", null, null, this);
okButton.setId("confirmationDialog.button.ok");
cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this);
cancelButton.setId("confirmationDialog.button.cancel");
label.setDescription(description);
final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton);
buttonLayout.setSpacing(true);
layout.setSpacing(true);
layout.setMargin(true);
layout.setSizeFull();
layout.addComponent(label);
layout.addComponent(buttonLayout);
layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT);
setContent(layout);
center();
}
内容来源于网络,如有侵权,请联系作者删除!