Example usage for com.vaadin.ui Label setIcon

List of usage examples for com.vaadin.ui Label setIcon

Introduction

In this page you can find the example usage for com.vaadin.ui Label setIcon.

Prototype

@Override
public void setIcon(Resource icon) 

Source Link

Document

Sets the component's icon.

Usage

From source file:org.opennms.features.topology.plugins.topo.bsm.info.SimulationModeEnabledPanelItemProvider.java

License:Open Source License

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);/*from   w w w.j  a v a 2s. co m*/
    layout.addStyleName("simulation");
    return layout;
}

From source file:se.natusoft.osgi.aps.apsadminweb.app.gui.vaadin.LogoPanel.java

License:Open Source License

public LogoPanel(Button.ClickListener clickListener) {
    super();/*from  w  w  w.java2s  .  c o  m*/
    HorizontalLayout topLayout = new HorizontalLayout();
    topLayout.setSpacing(true);
    topLayout.setMargin(true, true, false, true);
    setContent(topLayout);
    setStyleName(Reindeer.PANEL_LIGHT);

    ThemeResource logo = new ThemeResource("images/app-platform-services.png");
    Label logoLabel = new Label();
    logoLabel.setWidth("300px");
    logoLabel.setIcon(logo);

    addComponent(logoLabel);

    Label textLabel = new Label("<font size='+1'><b>Admin Web</b></font>");
    textLabel.setContentMode(Label.CONTENT_XHTML);
    addComponent(textLabel);

    Button refreshButton = new Button("Refresh", clickListener);
    refreshButton.setStyleName(BaseTheme.BUTTON_LINK);
    addComponent(refreshButton);
}

From source file:v7cr.ReviewTab.java

License:Open Source License

private Panel getNotesPanel(BSONBackedObject note) {
    Panel p = new Panel(note.getStringField("t"));
    p.setWidth("600px");
    Label c = new Label(note.getStringField("c"));
    p.addComponent(c);//  w ww.  j  a v a  2  s.c  o  m

    String v = note.getStringField("v");
    if ("+".equals(v)) {
        c.setIcon(new ThemeResource("../runo/icons/16/ok.png"));
    }
    if ("-".equals(v)) {
        c.setIcon(new ThemeResource("../runo/icons/16/attention.png"));
    }
    return p;
}