Example usage for com.vaadin.server FontAwesome LINK

List of usage examples for com.vaadin.server FontAwesome LINK

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome LINK.

Prototype

FontAwesome LINK

To view the source code for com.vaadin.server FontAwesome LINK.

Click Source Link

Usage

From source file:helpers.ToolTip.java

License:Open Source License

@Override
public final String getMinimizedValueAsHTML() {
    return FontAwesome.LINK.getHtml();
}

From source file:org.inakirj.imagerulette.MyUI.java

License:Open Source License

@Override
protected void init(VaadinRequest vaadinRequest) {

    TabBarView tabManager = new TabBarView();
    tabManager.addStyleName("tab-style");

    Button addImage = new Button();
    addImage.setIcon(FontAwesome.PLUS);/*from w w w.  j  ava2s.c o m*/
    addImage.addClickListener(e -> addImageRow());

    tabContent1 = new NavigationView();
    tabContent2 = new NavigationView();
    tabContent3 = new NavigationView();

    // Upload images tab
    tabContent1.setCaption("Set image URLs");
    tabContent1.setContent(new DiceGallerySetupView());
    tabContent1.setData("1");
    tabContent1.setRightComponent(addImage);
    Tab tabUpload = tabManager.addTab(tabContent1, "UPLOAD");
    tabUpload.setIcon(FontAwesome.LINK);

    // Setup tab
    tabContent2.setCaption("Create your dice pool");
    tabContent2.addStyleName("view-background");
    Button resetSliders = new Button("");
    resetSliders.addClickListener(e -> onResetSliders());
    resetSliders.addStyleName("reset-button");
    resetSliders.setIcon(FontAwesome.REPEAT);
    tabContent2.setRightComponent(resetSliders);
    tabContent2.setContent(new DiceURLSetupView(tabContent3));
    tabContent2.setData("2");
    Tab tabSetup = tabManager.addTab(tabContent2, "SETUP");
    tabSetup.setIcon(FontAwesome.COGS);

    // Dice tab
    tabContent3.setCaption("Roll the dice");
    tabContent3.setContent(new DicePlayView());
    tabContent3.setData("3");
    Tab tabPlay = tabManager.addTab(tabContent3, "DICE");
    tabPlay.setIcon(FontAwesome.CUBES);
    tabContent3.setEnabled(false);

    tabManager.setSelectedTab(tabContent2);
    tabManager.addListener(new SelectedTabChangeListener() {

        /** The Constant serialVersionUID. */
        private static final long serialVersionUID = -5418597313724716790L;

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            NavigationView tab = (NavigationView) (event.getTabSheet().getSelelectedTab()).getComponent();
            if (tab.getData().equals("3") && tab.isEnabled()) {
                ((DicePlayView) tab.getContent()).setupLottery(generateLotteryList);
            }
        }
    });
    setContent(tabManager);
}

From source file:ui.button.VisitButton.java

License:Apache License

public VisitButton(final Integer userId, final Integer hostId, String hostname, String language) {
    super(hostname, FontAwesome.LINK);
    this.guest = userId;
    this.host = hostId;
    this.language = language;
    addClickListener(new ClickListener() {
        @Override/*from  www  .  j ava  2s. c o m*/
        public void buttonClick(ClickEvent event) {
            ServiceLocator.findLifetimeService().setHostId(guest, host);
            String path = VaadinService.getCurrentRequest().getContextPath();
            Page.getCurrent().setLocation(path + "/visitor");
        }
    });
}