List of usage examples for com.vaadin.server FontAwesome PLUS
FontAwesome PLUS
To view the source code for com.vaadin.server FontAwesome PLUS.
Click Source Link
From source file:lifetime.component.welcome.RegisterButton.java
License:Apache License
public RegisterButton(String language) { super(Translator.getTranslation("Register", language), language, FontAwesome.PLUS); setId(StyleClassName.REGISTER_BUTTON.getId()); addClickListener(this); }
From source file:management.limbr.ui.entity.EntityListViewImpl.java
License:Open Source License
@PostConstruct @SuppressWarnings("unchecked") public void init() { grid = new Grid(); grid.setEditorEnabled(true);//from w w w . j ava 2 s . c o m grid.setSizeFull(); TextField filter = new TextField(); filter.setInputPrompt(messages.get("filterLabel")); filter.addTextChangeListener(event -> listEntities(event.getText())); Button addNewButton = new Button(messages.get("newButtonLabel"), FontAwesome.PLUS); HorizontalLayout actions = new HorizontalLayout(filter, addNewButton); actions.setSpacing(true); grid.removeAllColumns(); java.lang.reflect.Field[] fields = entityClass.getDeclaredFields(); for (java.lang.reflect.Field field : fields) { if (null != field.getAnnotation(ListColumn.class)) { grid.addColumn(field.getName()); } } Grid.Column editColumn = grid.addColumn(EDIT_PROPERTY_ID); editColumn.setMaximumWidth(50.0); editColumn.setHeaderCaption(""); editColumn.setRenderer(new ButtonRenderer( event -> listeners.forEach(listener -> listener.editItemClicked((T) event.getItemId())))); addNewButton.addClickListener(event -> listeners.forEach(EntityListView.Listener::addNewClicked)); addComponent(actions); addComponent(grid); listeners.forEach(listener -> listener.viewInitialized(this)); refresh(); }
From source file:management.limbr.ui.users.UsersViewImpl.java
License:Open Source License
@PostConstruct public void init() { grid = new Grid(); TextField filter = new TextField(); filter.setInputPrompt("Filter by username"); filter.addTextChangeListener(e -> listUsers(e.getText())); Button addNewButton = new Button("New user", FontAwesome.PLUS); HorizontalLayout actions = new HorizontalLayout(filter, addNewButton); actions.setSpacing(true);/*from ww w . ja v a2 s. c om*/ grid.removeAllColumns(); grid.addColumn("username"); grid.addColumn("displayName"); grid.addColumn("emailAddress"); grid.addItemClickListener(e -> { if (e.isDoubleClick()) { listeners.forEach(listener -> listener.itemDoubleClicked(e.getItem())); } }); addNewButton.addClickListener(e -> listeners.forEach(UsersViewListener::addNewClicked)); addComponent(actions); addComponent(grid); listeners.forEach(listener -> listener.viewInitialized(this)); refresh(); }
From source file:me.uni.emuseo.view.categories.CategoryLayout.java
License:Open Source License
public CategoryLayout() { categoryService = EMuseoUtil.getAppContext().getBean(CategoryService.class); categorySearchFormLayout = new CategorySearchFormLayout(); categorySearchFormLayout.addSearchBeanChangeListener(this); searchPanel = new ExpandingPanel(); searchPanel.setContent(categorySearchFormLayout); searchPanel.setCaption("Wyszukaj kategori"); createTable();//from w ww. j a va 2 s . c o m categoryTable.setWidth(100, Unit.PERCENTAGE); categoryTable.setPageLength(5); categoryTable.addStyleName("small"); pagedTableLayout = new PagedTableLayout<CategoryDTO>(categoryTable, new CategoryLazyLoadable(categoryService)); categoryPanel = new ExpandingPanel(); categoryPanel.setContent(pagedTableLayout); categoryPanel.setCaption("Kategorie"); categoryPanel.setExpanded(true); addButton = new Button("Dodaj kategori"); addButton.setIcon(FontAwesome.PLUS); addButton.addStyleName("emuseo-button-icon"); addButton.addStyleName("emuseo-button-margin"); addButton.setWidth(100, Unit.PERCENTAGE); addComponent(searchPanel); addComponent(categoryPanel); addComponent(addButton); addButton.addClickListener(new ClickListener() { private static final long serialVersionUID = -263205007196895260L; @Override public void buttonClick(ClickEvent event) { CategoryPopUpWindow categoryPopUpWidow = new CategoryPopUpWindow(new CategoryDTO(), "Dodaj kategori") { private static final long serialVersionUID = 3776311059670953583L; @Override protected boolean onSave(CategoryDTO bean) throws InvalidBeanException { categoryService.addCategory(bean); pagedTableLayout.refresh(); return true; } }; UI.getCurrent().addWindow(categoryPopUpWidow); } }); }
From source file:me.uni.emuseo.view.exhibits.ExhibitLayout.java
License:Open Source License
public ExhibitLayout() { exhibitService = EMuseoUtil.getAppContext().getBean(ExhibitService.class); resourceService = EMuseoUtil.getAppContext().getBean(ResourceService.class); exhibitSearchFormLayout = new ExhibitSearchFormLayout(); exhibitSearchFormLayout.addSearchBeanChangeListener(this); searchPanel = new ExpandingPanel(); searchPanel.setContent(exhibitSearchFormLayout); searchPanel.setCaption("Wyszukaj eksponat"); createTable();/*from w ww. j a va 2 s. c om*/ exhibitTable.setWidth(100, Unit.PERCENTAGE); exhibitTable.setPageLength(5); exhibitTable.addStyleName("small"); pagedTableLayout = new PagedTableLayout<ExhibitDTO>(exhibitTable, new ExhibitLazyLoadable(exhibitService)); exhibitPanel = new ExpandingPanel(); exhibitPanel.setContent(pagedTableLayout); exhibitPanel.setCaption("Eksponaty"); exhibitPanel.setExpanded(true); addButton = new Button("Dodaj eksponat"); addButton.setIcon(FontAwesome.PLUS); addButton.addStyleName("emuseo-button-icon"); addButton.addStyleName("emuseo-button-margin"); addButton.setWidth(100, Unit.PERCENTAGE); addComponent(searchPanel); addComponent(exhibitPanel); addComponent(addButton); addButton.addClickListener(new ClickListener() { private static final long serialVersionUID = -263205007196895260L; @Override public void buttonClick(ClickEvent event) { ExhibitPopUpWindow exhibitPopUpWidow = new ExhibitPopUpWindow(new ExhibitDTO(), "Dodaj eksponat") { private static final long serialVersionUID = 3776311059670953583L; @Override protected boolean onSave(ExhibitDTO bean) throws InvalidBeanException { exhibitService.addExhibit(bean); pagedTableLayout.refresh(); return true; } }; UI.getCurrent().addWindow(exhibitPopUpWidow); } }); }
From source file:me.uni.emuseo.view.users.UserLayout.java
License:Open Source License
public UserLayout() { userService = EMuseoUtil.getAppContext().getBean(UserService.class); userSearchFormLayout = new UserSearchFormLayout(); userSearchFormLayout.addSearchBeanChangeListener(this); searchPanel = new ExpandingPanel(); searchPanel.setContent(userSearchFormLayout); searchPanel.setCaption("Wyszukaj uytkownika"); createTable();//from ww w. java 2 s. co m userTable.setWidth(100, Unit.PERCENTAGE); userTable.setPageLength(5); userTable.addStyleName("small"); pagedTableLayout = new PagedTableLayout<UserDTO>(userTable, new UserLazyLoadable(userService)); userPanel = new ExpandingPanel(); userPanel.setContent(pagedTableLayout); userPanel.setCaption("Uytkownicy"); userPanel.setExpanded(true); addButton = new Button("Dodaj uytkownika"); addButton.setIcon(FontAwesome.PLUS); addButton.addStyleName("emuseo-button-icon"); addButton.addStyleName("emuseo-button-margin"); addButton.setWidth(100, Unit.PERCENTAGE); addComponent(searchPanel); addComponent(userPanel); addComponent(addButton); addButton.addClickListener(new ClickListener() { /** * */ private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { UserPopUpWindow userPopUpWidow = new UserPopUpWindow(new UserDTO(), "Dodaj uytkownika") { private static final long serialVersionUID = 3776311059670953585L; @Override protected boolean onSave(UserDTO bean) throws InvalidBeanException { userService.addUser(bean); pagedTableLayout.refresh(); return true; } }; UI.getCurrent().addWindow(userPopUpWidow); } }); }
From source file:org.eclipse.hawkbit.ui.common.AbstractMetadataPopupLayout.java
License:Open Source License
private Button createAddIcon() { addIcon = SPUIComponentProvider.getButton(UIComponentIdProvider.METADTA_ADD_ICON_ID, i18n.getMessage("button.save"), null, null, false, FontAwesome.PLUS, SPUIButtonStyleNoBorder.class); addIcon.addClickListener(event -> onAdd()); return addIcon; }
From source file:org.eclipse.hawkbit.ui.common.grid.AbstractGridHeader.java
License:Open Source License
private Button createAddButton() { final Button button = SPUIComponentProvider.getButton(getAddIconId(), "", i18n.getMessage(UIMessageIdProvider.TOOLTIP_ADD), null, false, FontAwesome.PLUS, SPUIButtonStyleNoBorder.class); button.addClickListener(this::addNewItem); return button; }
From source file:org.eclipse.hawkbit.ui.common.table.AbstractTableHeader.java
License:Open Source License
private Button createAddIcon() { final Button button = SPUIComponentProvider.getButton(getAddIconId(), "", i18n.getMessage(UIMessageIdProvider.TOOLTIP_ADD), null, false, FontAwesome.PLUS, SPUIButtonStyleNoBorder.class); button.addClickListener(this::addNewItem); return button; }
From source file:org.eclipse.hawkbit.ui.components.ConfigMenuBar.java
License:Open Source License
private void addMenuItems() { if (createPermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_CREATE), FontAwesome.PLUS, addButtonCommand);//w w w.j av a2 s. c om } if (updatePermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_EDIT), FontAwesome.EDIT, updateButtonCommand); } if (deletePermission) { config.addItem(i18n.getMessage(UIMessageIdProvider.CAPTION_CONFIG_DELETE), FontAwesome.TRASH_O, deleteButtonCommand); } }