List of usage examples for com.vaadin.v7.shared.ui.label ContentMode HTML
ContentMode HTML
To view the source code for com.vaadin.v7.shared.ui.label ContentMode HTML.
Click Source Link
From source file:info.magnolia.vaadin.periscope.ResultList.java
License:Open Source License
private Component createResultEntry(final Result result) { final Label icon = new Label(); icon.setStyleName("icon " + result.getIcon().orElse("")); final Label text = new Label(result.getHtmlText(), ContentMode.HTML); final HorizontalLayout entry = new HorizontalLayout(icon, text); entry.setStyleName("result-entry"); results.put(entry, result);//from w w w.j a va 2 s .com entry.addLayoutClickListener((LayoutEvents.LayoutClickListener) event -> { resultPickCallbacks.forEach(pickCallback -> pickCallback.accept(result)); }); return entry; }
From source file:org.jpos.qi.InfoDialog.java
License:Open Source License
public InfoDialog(String caption, String info) { super(caption); setWidth("350px"); setModal(true);/*from w w w . jav a 2s .c o m*/ setResizable(false); close.setStyleName(ValoTheme.BUTTON_SMALL); VerticalLayout content = new VerticalLayout(); content.setMargin(true); content.setSpacing(true); setContent(content); if (info != null) { Label l = new Label(info); l.setContentMode(ContentMode.HTML); content.addComponent(l); } HorizontalLayout hl = new HorizontalLayout(); hl.setMargin(new MarginInfo(true, false, false, false)); hl.setSpacing(true); hl.setWidth("100%"); hl.addComponent(close); hl.setComponentAlignment(close, Alignment.BOTTOM_RIGHT); content.addComponent(hl); }
From source file:org.vaadin.viritin.v7.label.Header.java
License:Apache License
private void render() { if (text != null) { setContentMode(ContentMode.HTML); StringBuilder sb = new StringBuilder("<h"); sb.append(headerLevel);/*from w ww .j av a2s.c om*/ sb.append(">"); sb.append(Jsoup.clean(text, getWhitelist())); sb.append("</h"); sb.append(headerLevel); sb.append(">"); super.setValue(sb.toString()); text = null; } }
From source file:org.vaadin.viritin.v7.label.RichText.java
License:Apache License
@Override public void beforeClientResponse(boolean initial) { setContentMode(ContentMode.HTML); super.setValue(Jsoup.clean(richText, getWhitelist())); super.beforeClientResponse(initial); }