List of usage examples for com.vaadin.ui Button setIconAlternateText
public void setIconAlternateText(String iconAltText)
From source file:pl.exsio.frameset.vaadin.account.menu.presenter.AccountMenuPresenterImpl.java
License:Open Source License
protected Button getSettingsButton(final User user) { final AccountWindowPresenter.AccountEditionListener listener = this; Button accountSettings = new NativeButton(t("core.account.settings")); accountSettings.setIconAlternateText(t("core.account.settings")); accountSettings.setIcon(FontAwesome.COG); accountSettings.setStyleName("account-settings"); accountSettings.addClickListener(new Button.ClickListener() { @Override/* www . j ava 2s .co m*/ public void buttonClick(Button.ClickEvent event) { AccountWindowPresenter window = ctx.getBean(AccountWindowPresenter.class); window.addAccountEditionListener(listener); window.show(); } }); return accountSettings; }
From source file:pl.exsio.frameset.vaadin.account.menu.presenter.AccountMenuPresenterImpl.java
License:Open Source License
protected Button getLogoutButton() { Button logout = new NativeButton(t("core.logout")); logout.setIconAlternateText(t("core.logout")); logout.setIcon(FontAwesome.TIMES);// ww w . j av a2 s .c o m logout.setStyleName("logout"); logout.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { ConfirmationDialog.show(t("core.logout.confirm"), new ConfirmationDialog.Handler() { @Override public void handle(Button.ClickEvent event) { UI.getCurrent().getSession().close(); UI.getCurrent().getPage().setLocation(logoutPath); } }, null); } }); return logout; }