/** * Creates a new instance of Label with text-contents. * * @param content * @param contentMode */ public Label(String content, ContentMode contentMode) { setValue(content); setContentMode(contentMode); setWidth(100, Unit.PERCENTAGE); }
/** * Creates a new instance of Label with text-contents read from given * datasource. * * @param contentSource * @param contentMode */ public Label(Property contentSource, ContentMode contentMode) { setPropertyDataSource(contentSource); setContentMode(contentMode); setWidth(100, Unit.PERCENTAGE); }
@Override public void readDesign(Element design, DesignContext designContext) { super.readDesign(design, designContext); String innerHtml = design.html(); boolean plainText = design.hasAttr(DESIGN_ATTR_PLAIN_TEXT); if (plainText) { setContentMode(ContentMode.TEXT); } else { setContentMode(ContentMode.HTML); } if (innerHtml != null && !"".equals(innerHtml)) { if (plainText) { innerHtml = DesignFormatter.decodeFromTextNode(innerHtml); } setValue(innerHtml); } }
public static Label createStatusLabel(final String caption, final Status status, final String text) { final Label label = createLabel(caption, text); label.setContentMode(ContentMode.HTML); label.addStyleName("severity-" + status.toString().toLowerCase()); label.addStyleName("bright"); return label; }
public NameEditForm(MBeansController controller) { initFields(); this.controller = controller; captionLabel = new Label(); captionLabel.setContentMode(ContentMode.HTML); addComponent(captionLabel); addComponent(contentLayout); setWidth(100, Unit.PERCENTAGE); }
Label label = new Label(sb.toString()); label.setSizeFull(); label.setContentMode(ContentMode.HTML); component.addComponent(label);
initMibTree(logger); final Label label = new Label("<p>Use the right-click context menu over the MIB tree files, to display the compiler operations.</p>"); label.setContentMode(ContentMode.HTML);
labelTitle.setContentMode(ContentMode.HTML); } else { labelTitle = new Label(graph.getTitle());
labelTitle.setContentMode(ContentMode.HTML); } else { labelTitle = new Label(graph.getTitle());
public HeaderPanel() { label = new Label(); label.setContentMode(ContentMode.HTML); helpPopupView = new PopupView(new HelpContent(UiState.ServiceConfigurationView)); helpPopupView.setVisible(false); helpPopupView.setPopupVisible(false); Button popupButton = UIHelper.createButton("", "help", Config.Icons.HELP, new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { helpPopupView.setPopupVisible(true); helpPopupView.setVisible(true); } }); HorizontalLayout layout = new HorizontalLayout(); layout.setSpacing(true); layout.setMargin(true); layout.addComponent(popupButton); layout.addComponent(helpPopupView); layout.addComponent(label); layout.setComponentAlignment(label, Alignment.MIDDLE_LEFT); setContent(layout); }
label.setContentMode(ContentMode.HTML); table.addItem(new Object[]{label, entry.getDate(), entry.getUser(), entry.getWorkspace(), entry.getPath(), entry.getSubscriber(), entry.getError().toString(), entry.getError().getCause() != null ? entry.getError().getCause().toString() : StringUtils.EMPTY}, i++);
"<pre>" + StringEscapeUtils.escapeHtml(e.getMessage()) + "</pre>"); errorLabel.setContentMode(ContentMode.HTML);
public MBeansContentPanel(final MBeansController controller) { this.controller = controller; this.attributesTable = new AttributesTable(controller, controller); emptyLayout = new VerticalLayout(); emptyLayout.setSpacing(true); emptyLayout.setMargin(true); emptyLayout.addComponent(new Label("No MBean or Composite selected. Please select one to modify data.")); nameEditForm = new NameEditForm(controller); captionLabel = new Label(); captionLabel.setContentMode(ContentMode.HTML); VerticalLayout attributeLayout = new VerticalLayout(); attributeLayout.addComponent(captionLabel); attributeLayout.addComponent(attributesTable); attributeLayout.setSizeFull(); attributeLayout.setExpandRatio(attributesTable, 1); contentLayout = new VerticalLayout(); contentLayout.setSpacing(true); contentLayout.setMargin(true); contentLayout.addComponent(nameEditForm); contentLayout.addComponent(attributeLayout); contentLayout.setSizeFull(); contentLayout.setExpandRatio(attributeLayout, 1); // by default we do not show details addComponent(emptyLayout); addComponent(contentLayout); setSizeFull(); // we have to listen for "selection" value changed events controller.registerSelectionValueChangedListener(nameEditForm); controller.registerSelectionValueChangedListener(attributesTable); }
label.setContentMode(ContentMode.HTML); table.addItem(new Object[]{label, entry.getDate(), entry.getUser(), entry.getWorkspace(), entry.getPath(), entry.getSubscriber()}, i++);
link.setContentMode(ContentMode.HTML); link.setValue("<a href=\"/opennms/index.jsp\" id=\"onmslogo\"></a>"); addComponent(link);