本文整理了Java中com.vaadin.ui.Label.setIcon()
方法的一些代码示例,展示了Label.setIcon()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setIcon()
方法的具体详情如下:
包路径:com.vaadin.ui.Label
类名称:Label
方法名:setIcon
暂无
代码示例来源:origin: stackoverflow.com
public void setUpProfile(Form f) {
Label imageLabel = findMyImage(f);
Image img = getImageFromRes("myprofile.png");
Image scaled = img.scaledWidth(f.getWidth() / 2);
EncodedImage enc = EncodedImage.createFromImage(scaled, false);
Display.getInstance().callSerially(new Runnable() {
@Override
public void run() {
imageLabel.setIcon(URLImage.createToStorage(enc,
"profileImage8", me.getPicture(), RESIZE_SCALE_WITH_ROUND_MASK));
f.revalidate();
}
});
findProfNameLabel(f).setText(me.getName());
findProfAgeLabel(f).setText(me.getAge() + " Years old");
findProfPrefLabel(f).setText("Interested in " + me.getPref());
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initSuccessIndicator() {
successIndicator = new Label();
successIndicator.setIcon(Images.SUCCESS);
successIndicator.setVisible(false);
addComponent(successIndicator);
}
代码示例来源: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;
}
代码示例来源: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: org.opennms.features.topology/org.opennms.features.topology.app
public LayoutHintComponent(LayoutManager layoutManager, GraphContainer graphContainer) {
this.layoutManager = layoutManager;
final Label icon = new Label();
icon.setIcon(FontAwesome.INFO_CIRCLE);
final Label text = new Label("A manual layout exists for the current selection.");
final HorizontalLayout layout = new HorizontalLayout();
layout.addComponent(icon);
layout.addComponent(text);
layout.setDescription("Click to apply the manual layout");
layout.addLayoutClickListener((event) -> {
graphContainer.setLayoutAlgorithm(new ManualLayoutAlgorithm(layoutManager));
graphContainer.redoLayout();
});
layout.setSpacing(true);
setCompositionRoot(layout);
}
代码示例来源:origin: eclipse/hawkbit
final Label manualLabel = new Label();
manualLabel.setStyleName("statusIconPending");
manualLabel.setIcon(FontAwesome.HAND_PAPER_O);
manualLabel.setCaption(i18n.getMessage("caption.rollout.start.manual"));
manualLabel.setDescription(i18n.getMessage("caption.rollout.start.manual.desc"));
final Label autoStartLabel = new Label();
autoStartLabel.setSizeFull();
autoStartLabel.setIcon(FontAwesome.PLAY);
autoStartLabel.setCaption(i18n.getMessage("caption.rollout.start.auto"));
autoStartLabel.setDescription(i18n.getMessage("caption.rollout.start.auto.desc"));
final Label scheduledLabel = new Label();
scheduledLabel.setStyleName("statusIconPending");
scheduledLabel.setIcon(FontAwesome.CLOCK_O);
scheduledLabel.setCaption(i18n.getMessage("caption.rollout.start.scheduled"));
scheduledLabel.setDescription(i18n.getMessage("caption.rollout.start.scheduled.desc"));
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
final Label manualLabel = new Label();
manualLabel.setStyleName("statusIconPending");
manualLabel.setIcon(FontAwesome.HAND_PAPER_O);
manualLabel.setCaption(i18n.getMessage("caption.rollout.start.manual"));
manualLabel.setDescription(i18n.getMessage("caption.rollout.start.manual.desc"));
final Label autoStartLabel = new Label();
autoStartLabel.setSizeFull();
autoStartLabel.setIcon(FontAwesome.PLAY);
autoStartLabel.setCaption(i18n.getMessage("caption.rollout.start.auto"));
autoStartLabel.setDescription(i18n.getMessage("caption.rollout.start.auto.desc"));
final Label scheduledLabel = new Label();
scheduledLabel.setStyleName("statusIconPending");
scheduledLabel.setIcon(FontAwesome.CLOCK_O);
scheduledLabel.setCaption(i18n.getMessage("caption.rollout.start.scheduled"));
scheduledLabel.setDescription(i18n.getMessage("caption.rollout.start.scheduled.desc"));
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
final Label forceLabel = new Label();
forceLabel.setStyleName("statusIconPending");
forceLabel.setIcon(FontAwesome.BOLT);
forceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED));
forceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_FORCED_ITEM));
final Label autoForceLabel = new Label();
autoForceLabel.setStyleName("statusIconPending");
autoForceLabel.setIcon(FontAwesome.HISTORY);
autoForceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_TIME_FORCED));
autoForceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_ITEM));
代码示例来源:origin: eclipse/hawkbit
final Label forceLabel = new Label();
forceLabel.setStyleName("statusIconPending");
forceLabel.setIcon(FontAwesome.BOLT);
forceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_FORCED));
forceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_FORCED_ITEM));
final Label autoForceLabel = new Label();
autoForceLabel.setStyleName("statusIconPending");
autoForceLabel.setIcon(FontAwesome.HISTORY);
autoForceLabel.setCaption(i18n.getMessage(UIMessageIdProvider.CAPTION_ACTION_TIME_FORCED));
autoForceLabel.setDescription(i18n.getMessage(UIMessageIdProvider.TOOLTIP_TIMEFORCED_ITEM));
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
hlayout.addComponent(combobox);
changeIcon.setIcon(FontAwesome.CHECK);
hlayout.addComponent(changeIcon);
changeIcon.setVisible(false);
代码示例来源:origin: eclipse/hawkbit
hlayout.addComponent(combobox);
changeIcon.setIcon(FontAwesome.CHECK);
hlayout.addComponent(changeIcon);
changeIcon.setVisible(false);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
label.setIcon(VaadinIcons.COG);
label.addStyleName(ValoTheme.LABEL_LARGE);
label.addStyleName(ValoTheme.LABEL_BOLD);
内容来源于网络,如有侵权,请联系作者删除!