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:com.mycollab.module.project.view.ticket.TicketDashboardViewImpl.java
License:Open Source License
public TicketDashboardViewImpl() { this.withMargin(new MarginInfo(false, true, true, true)); ticketSearchPanel = new TicketSearchPanel(); MHorizontalLayout groupWrapLayout = new MHorizontalLayout(); groupWrapLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); groupWrapLayout.addComponent(new ELabel(UserUIContext.getMessage(GenericI18Enum.ACTION_SORT))); final ComboBox sortCombo = new ValueComboBox(false, UserUIContext.getMessage(GenericI18Enum.OPT_SORT_DESCENDING), UserUIContext.getMessage(GenericI18Enum.OPT_SORT_ASCENDING)); sortCombo.addValueChangeListener(valueChangeEvent -> { String sortValue = (String) sortCombo.getValue(); if (UserUIContext.getMessage(GenericI18Enum.OPT_SORT_ASCENDING).equals(sortValue)) { sortDirection = SearchCriteria.ASC; } else {/*from w ww. j a v a 2 s .co m*/ sortDirection = SearchCriteria.DESC; } queryAndDisplayTickets(); }); sortDirection = SearchCriteria.DESC; groupWrapLayout.addComponent(sortCombo); groupWrapLayout.addComponent(new ELabel(UserUIContext.getMessage(GenericI18Enum.OPT_GROUP))); final ComboBox groupCombo = new ValueComboBox(false, UserUIContext.getMessage(GenericI18Enum.FORM_DUE_DATE), UserUIContext.getMessage(GenericI18Enum.FORM_START_DATE), UserUIContext.getMessage(GenericI18Enum.FORM_CREATED_TIME), UserUIContext.getMessage(GenericI18Enum.OPT_PLAIN), UserUIContext.getMessage(GenericI18Enum.OPT_USER), UserUIContext.getMessage(MilestoneI18nEnum.SINGLE)); groupByState = UserUIContext.getMessage(MilestoneI18nEnum.SINGLE); groupCombo.setValue(UserUIContext.getMessage(MilestoneI18nEnum.SINGLE)); groupCombo.addValueChangeListener(valueChangeEvent -> { groupByState = (String) groupCombo.getValue(); queryAndDisplayTickets(); }); groupWrapLayout.addComponent(groupCombo); ticketSearchPanel.addHeaderRight(groupWrapLayout); MButton printBtn = new MButton("", clickEvent -> UI.getCurrent() .addWindow(new TicketCustomizeReportOutputWindow(new LazyValueInjector() { @Override protected Object doEval() { return baseCriteria; } }))).withIcon(FontAwesome.PRINT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.ACTION_EXPORT)); groupWrapLayout.addComponent(printBtn); MButton newTicketBtn = new MButton(UserUIContext.getMessage(TicketI18nEnum.NEW), clickEvent -> { UI.getCurrent().addWindow(AppContextUtil.getSpringBean(TicketComponentFactory.class) .createNewTicketWindow(null, CurrentProjectVariables.getProjectId(), null, false)); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(CurrentProjectVariables.canWriteTicket()); groupWrapLayout.addComponent(newTicketBtn); MButton advanceDisplayBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_LIST)) .withIcon(FontAwesome.NAVICON).withWidth("100px"); MButton kanbanBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_KANBAN), clickEvent -> displayKanbanView()).withWidth("100px").withIcon(FontAwesome.TH); ToggleButtonGroup viewButtons = new ToggleButtonGroup(); viewButtons.addButton(advanceDisplayBtn); viewButtons.addButton(kanbanBtn); viewButtons.withDefaultButton(advanceDisplayBtn); groupWrapLayout.addComponent(viewButtons); MHorizontalLayout mainLayout = new MHorizontalLayout().withFullHeight().withFullWidth(); wrapBody = new MVerticalLayout().withMargin(new MarginInfo(false, true, true, false)); rightColumn = new MVerticalLayout().withWidth("370px") .withMargin(new MarginInfo(true, false, false, false)); mainLayout.with(wrapBody, rightColumn).expand(wrapBody); this.with(ticketSearchPanel, mainLayout); }
From source file:com.mycollab.module.project.view.user.ProjectMembersWidget.java
License:Open Source License
public ProjectMembersWidget() { super("", new CssLayout()); final MButton sortBtn = new MButton().withIcon(FontAwesome.SORT_ALPHA_ASC) .withStyleName(WebThemes.BUTTON_ICON_ONLY); sortBtn.addClickListener(clickEvent -> { sortAsc = !sortAsc;//from w ww . j a v a2s . c o m if (sortAsc) { sortBtn.setIcon(FontAwesome.SORT_ALPHA_ASC); searchCriteria.setOrderFields(Collections .singletonList(new SearchCriteria.OrderField("memberFullName", SearchCriteria.ASC))); } else { sortBtn.setIcon(FontAwesome.SORT_ALPHA_DESC); searchCriteria.setOrderFields(Collections .singletonList(new SearchCriteria.OrderField("memberFullName", SearchCriteria.DESC))); } memberList.setSearchCriteria(searchCriteria); setTitle(UserUIContext.getMessage(ProjectCommonI18nEnum.WIDGET_MEMBERS_TITLE, memberList.getTotalCount())); }); addHeaderElement(sortBtn); final SearchTextField searchTextField = new SearchTextField() { @Override public void doSearch(String value) { searchCriteria.setMemberFullName(StringSearchField.and(value)); showMembers(); } @Override public void emptySearch() { searchCriteria.setMemberFullName(null); showMembers(); } }; searchTextField.addStyleName(ValoTheme.TEXTFIELD_SMALL); addHeaderElement(searchTextField); MButton inviteMemberBtn = new MButton(UserUIContext.getMessage(ProjectMemberI18nEnum.BUTTON_NEW_INVITEE), clickEvent -> EventBusFactory.getInstance() .post(new ProjectMemberEvent.GotoInviteMembers(this, null))).withIcon(FontAwesome.PLUS) .withStyleName(WebThemes.BUTTON_ACTION).withVisible( CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.USERS)); addHeaderElement(inviteMemberBtn); memberList = new DefaultBeanPagedList<>(AppContextUtil.getSpringBean(ProjectMemberService.class), new MemberRowDisplayHandler(), 7); bodyContent.addComponent(memberList); }
From source file:com.mycollab.module.project.view.UserProjectDashboardViewImpl.java
License:Open Source License
@Override public void lazyLoadView() { UserDashboardView userDashboardView = UIUtils.getRoot(this, UserDashboardView.class); List<Integer> prjKeys = userDashboardView.getInvolvedProjectKeys(); if (CollectionUtils.isNotEmpty(prjKeys)) { ResponsiveLayout contentWrapper = new ResponsiveLayout(ResponsiveLayout.ContainerType.FIXED); contentWrapper.setSizeFull();/*from w w w. j av a 2 s . c o m*/ addComponent(contentWrapper); ResponsiveRow row = new ResponsiveRow(); AllMilestoneTimelineWidget milestoneTimelineWidget = new AllMilestoneTimelineWidget(); TicketOverdueWidget ticketOverdueWidget = new TicketOverdueWidget(); ActivityStreamComponent activityStreamComponent = new ActivityStreamComponent(); UserUnresolvedTicketWidget unresolvedAssignmentThisWeekWidget = new UserUnresolvedTicketWidget(); UserUnresolvedTicketWidget unresolvedAssignmentNextWeekWidget = new UserUnresolvedTicketWidget(); ResponsiveColumn column1 = new ResponsiveColumn(); column1.addRule(ResponsiveLayout.DisplaySize.LG, 7); column1.addRule(ResponsiveLayout.DisplaySize.MD, 7); column1.addRule(ResponsiveLayout.DisplaySize.SM, 12); column1.addRule(ResponsiveLayout.DisplaySize.XS, 12); MVerticalLayout leftPanel = new MVerticalLayout(milestoneTimelineWidget, unresolvedAssignmentThisWeekWidget, unresolvedAssignmentNextWeekWidget, ticketOverdueWidget) .withMargin(new MarginInfo(true, true, false, false)).withFullWidth(); column1.setComponent(leftPanel); MVerticalLayout rightPanel = new MVerticalLayout().withMargin(false); MyProjectListComponent myProjectListComponent = new MyProjectListComponent(); rightPanel.with(myProjectListComponent, activityStreamComponent); ResponsiveColumn column2 = new ResponsiveColumn(); column2.addRule(ResponsiveLayout.DisplaySize.LG, 5); column2.addRule(ResponsiveLayout.DisplaySize.MD, 5); column1.addRule(ResponsiveLayout.DisplaySize.SM, 12); column1.addRule(ResponsiveLayout.DisplaySize.XS, 12); column2.setComponent(rightPanel); row.addColumn(column1); row.addColumn(column2); contentWrapper.addRow(row); activityStreamComponent.showFeeds(prjKeys); milestoneTimelineWidget.display(); myProjectListComponent.displayDefaultProjectsList(); ticketOverdueWidget.showTicketsByStatus(prjKeys); unresolvedAssignmentThisWeekWidget.displayUnresolvedAssignmentsThisWeek(); unresolvedAssignmentNextWeekWidget.displayUnresolvedAssignmentsNextWeek(); } else { this.with(ELabel.h1(VaadinIcons.TASKS.getHtml()).withWidthUndefined()); this.with(ELabel.h2(UserUIContext.getMessage(GenericI18Enum.VIEW_NO_ITEM_TITLE)).withWidthUndefined()); if (UserUIContext.canWrite(RolePermissionCollections.CREATE_NEW_PROJECT)) { MButton newProjectBtn = new MButton(UserUIContext.getMessage(ProjectI18nEnum.NEW), clickEvent -> UI.getCurrent() .addWindow(ViewManager.getCacheComponent(AbstractProjectAddWindow.class))) .withStyleName(WebThemes.BUTTON_ACTION).withIcon(FontAwesome.PLUS); with(newProjectBtn); } alignAll(Alignment.TOP_CENTER); } }
From source file:com.mycollab.module.user.accountsettings.team.view.RoleSearchPanel.java
License:Open Source License
@Override protected Component buildExtraControls() { return new MButton(UserUIContext.getMessage(RoleI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance().post(new RoleEvent.GotoAdd(this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.ACCOUNT_ROLE)); }
From source file:com.mycollab.module.user.accountsettings.team.view.UserListViewImpl.java
License:Open Source License
public UserListViewImpl() { super();/*from ww w. ja v a2 s . c om*/ this.setMargin(new MarginInfo(false, true, false, true)); MHorizontalLayout header = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, false)) .withFullWidth(); MButton createBtn = new MButton(UserUIContext.getMessage(UserI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance().post(new UserEvent.GotoAdd(this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.ACCOUNT_USER)); headerText = HeaderWithFontAwesome.h2(FontAwesome.USERS, UserUIContext.getMessage(UserI18nEnum.LIST) + " " + UserUIContext.getMessage(GenericI18Enum.OPT_TOTAL_VALUE, 0)); final MButton sortBtn = new MButton().withIcon(FontAwesome.SORT_ALPHA_ASC) .withStyleName(WebThemes.BUTTON_ICON_ONLY); sortBtn.addClickListener(clickEvent -> { sortAsc = !sortAsc; if (sortAsc) { sortBtn.setIcon(FontAwesome.SORT_ALPHA_ASC); displayUsers(); } else { sortBtn.setIcon(FontAwesome.SORT_ALPHA_DESC); displayUsers(); } }); header.addComponent(sortBtn); final SearchTextField searchTextField = new SearchTextField() { @Override public void doSearch(String value) { searchCriteria.setDisplayName(StringSearchField.and(value)); displayUsers(); } @Override public void emptySearch() { searchCriteria.setDisplayName(null); displayUsers(); } }; searchTextField.addStyleName(ValoTheme.TEXTFIELD_SMALL); MButton printBtn = new MButton("", clickEvent -> UI.getCurrent() .addWindow(new UserCustomizeReportOutputWindow(new LazyValueInjector() { @Override protected Object doEval() { return searchCriteria; } }))).withIcon(FontAwesome.PRINT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.ACTION_EXPORT)); header.with(headerText, sortBtn, searchTextField, printBtn, createBtn).alignAll(Alignment.MIDDLE_LEFT) .expand(headerText); this.addComponent(header); contentLayout = new CssLayout(); contentLayout.setWidth("100%"); this.addComponent(contentLayout); }
From source file:com.mycollab.module.user.ui.components.PreviewFormControlsGenerator.java
License:Open Source License
public HorizontalLayout createButtonControls(int buttonEnableFlags, String permissionItem) { optionBtn = new PopupButton(); optionBtn.addStyleName(WebThemes.BUTTON_OPTION); optionBtn.setIcon(FontAwesome.ELLIPSIS_H); if (permissionItem != null) { boolean canWrite = UserUIContext.canWrite(permissionItem); boolean canAccess = UserUIContext.canAccess(permissionItem); boolean canRead = UserUIContext.canRead(permissionItem); if ((buttonEnableFlags & ADD_BTN_PRESENTED) == ADD_BTN_PRESENTED) { MButton addBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADD), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireAddForm(item); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION).withVisible(canWrite); editButtons.addComponent(addBtn); }//w w w.j a va 2 s .c o m if ((buttonEnableFlags & EDIT_BTN_PRESENTED) == EDIT_BTN_PRESENTED) { MButton editBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_EDIT), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireEditForm(item); }).withIcon(FontAwesome.EDIT).withStyleName(WebThemes.BUTTON_ACTION).withVisible(canWrite); editButtons.addComponent(editBtn); } if ((buttonEnableFlags & DELETE_BTN_PRESENTED) == DELETE_BTN_PRESENTED) { MButton deleteBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_DELETE), clickEvent -> { T item = previewForm.getBean(); previewForm.fireDeleteForm(item); }).withIcon(FontAwesome.TRASH_O).withStyleName(WebThemes.BUTTON_DANGER) .withVisible(canAccess); editButtons.addComponent(deleteBtn); } layout.with(editButtons); if ((buttonEnableFlags & NAVIGATOR_BTN_PRESENTED) == NAVIGATOR_BTN_PRESENTED) { ButtonGroup navigationBtns = new ButtonGroup(); MButton previousItem = new MButton("", clickEvent -> { T item = previewForm.getBean(); previewForm.fireGotoPrevious(item); }).withIcon(FontAwesome.CHEVRON_LEFT).withStyleName(WebThemes.BUTTON_ACTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_PREVIOUS_ITEM)) .withVisible(canRead); navigationBtns.addButton(previousItem); MButton nextItemBtn = new MButton("", clickEvent -> { T item = previewForm.getBean(); previewForm.fireGotoNextItem(item); }).withIcon(FontAwesome.CHEVRON_RIGHT).withStyleName(WebThemes.BUTTON_ACTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_NEXT_ITEM)) .withVisible(canRead); navigationBtns.addButton(nextItemBtn); layout.with(navigationBtns); } if ((buttonEnableFlags & CLONE_BTN_PRESENTED) == CLONE_BTN_PRESENTED) { MButton cloneBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLONE), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireCloneForm(item); }).withIcon(FontAwesome.ROAD).withVisible(canWrite); popupButtonsControl.addOption(cloneBtn); } if (popupButtonsControl.getComponentCount() > 0) { optionBtn.setContent(popupButtonsControl); layout.with(optionBtn); } } return layout; }
From source file:com.mycollab.vaadin.web.ui.BuildCriterionComponent.java
License:Open Source License
public BuildCriterionComponent(SearchLayout<S> searchLayout, Param[] paramFields, String searchCategory) { this.hostSearchLayout = searchLayout; this.paramFields = paramFields; this.searchCategory = searchCategory; MHorizontalLayout headerBox = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, true)); headerBox.setDefaultComponentAlignment(Alignment.TOP_LEFT); addComponent(headerBox);// w w w .j ava 2 s.com Label filterLbl = new Label(UserUIContext.getMessage(GenericI18Enum.OPT_SAVED_FILTER)); headerBox.with(filterLbl).withAlign(filterLbl, Alignment.TOP_LEFT); filterBox = new MHorizontalLayout(); headerBox.with(filterBox).withAlign(filterBox, Alignment.TOP_LEFT); buildFilterBox(null); searchContainer = new MVerticalLayout().withMargin(false); searchContainer.setDefaultComponentAlignment(Alignment.TOP_LEFT); MButton addCriteriaBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADD_CRITERIA), clickEvent -> { CriteriaSelectionLayout newCriteriaBar = new CriteriaSelectionLayout( searchContainer.getComponentCount() + 1); searchContainer.addComponent(newCriteriaBar); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION); this.with(searchContainer, new MHorizontalLayout(addCriteriaBtn).withMargin(true)); }
From source file:com.mycollab.vaadin.web.ui.BuildCriterionComponent.java
License:Open Source License
private void buildFilterBox(String queryName) { filterBox.removeAllComponents();/*from w w w .j a v a2 s . co m*/ SavedSearchResultComboBox filterComboBox = new SavedSearchResultComboBox(); filterBox.addComponent(filterComboBox); MButton saveSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_NEW_FILTER), clickEvent -> buildSaveFilterBox()).withStyleName(WebThemes.BUTTON_ACTION) .withIcon(FontAwesome.PLUS); filterBox.addComponent(saveSearchBtn); }
From source file:com.mycollab.vaadin.web.ui.ProjectPreviewFormControlsGenerator.java
License:Open Source License
public HorizontalLayout createButtonControls(int buttonEnableFlags, String permissionItem) { optionBtn = new PopupButton(); optionBtn.addStyleName(WebThemes.BUTTON_OPTION); optionBtn.setIcon(FontAwesome.ELLIPSIS_H); if (permissionItem != null) { boolean canWrite = CurrentProjectVariables.canWrite(permissionItem); boolean canAccess = CurrentProjectVariables.canAccess(permissionItem); boolean canRead = CurrentProjectVariables.canRead(permissionItem); if ((buttonEnableFlags & ASSIGN_BTN_PRESENTED) == ASSIGN_BTN_PRESENTED) { MButton assignBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ASSIGN), clickEvent -> {//from w w w .j a va 2 s. c om T item = previewForm.getBean(); previewForm.fireAssignForm(item); }).withIcon(FontAwesome.SHARE).withStyleName(WebThemes.BUTTON_ACTION).withVisible(canWrite); editButtons.addComponent(assignBtn); } if ((buttonEnableFlags & ADD_BTN_PRESENTED) == ADD_BTN_PRESENTED) { MButton addBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADD), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireAddForm(item); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION).withVisible(canWrite); editButtons.addComponent(addBtn); } if ((buttonEnableFlags & EDIT_BTN_PRESENTED) == EDIT_BTN_PRESENTED) { MButton editBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_EDIT), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireEditForm(item); }).withIcon(FontAwesome.EDIT).withStyleName(WebThemes.BUTTON_ACTION).withVisible(canWrite); editButtons.addComponent(editBtn); } if ((buttonEnableFlags & DELETE_BTN_PRESENTED) == DELETE_BTN_PRESENTED) { MButton deleteBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_DELETE), clickEvent -> { T item = previewForm.getBean(); previewForm.fireDeleteForm(item); }).withIcon(FontAwesome.TRASH_O).withStyleName(WebThemes.BUTTON_DANGER) .withVisible(canAccess); editButtons.addComponent(deleteBtn); } if ((buttonEnableFlags & PRINT_BTN_PRESENTED) == PRINT_BTN_PRESENTED) { final PrintButton printBtn = new PrintButton(); printBtn.withListener(clickEvent -> { T item = previewForm.getBean(); previewForm.firePrintForm(printBtn, item); }).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.ACTION_PRINT)) .withVisible(canRead); editButtons.addComponent(printBtn); } if ((buttonEnableFlags & CLONE_BTN_PRESENTED) == CLONE_BTN_PRESENTED) { MButton cloneBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLONE), clickEvent -> { optionBtn.setPopupVisible(false); T item = previewForm.getBean(); previewForm.fireCloneForm(item); }).withIcon(FontAwesome.ROAD).withVisible(canWrite); popupButtonsControl.addOption(cloneBtn); } layout.with(editButtons); if ((buttonEnableFlags & NAVIGATOR_BTN_PRESENTED) == NAVIGATOR_BTN_PRESENTED) { ButtonGroup navigationBtns = new ButtonGroup(); MButton previousItem = new MButton("", clickEvent -> { T item = previewForm.getBean(); previewForm.fireGotoPrevious(item); }).withIcon(FontAwesome.CHEVRON_LEFT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_PREVIOUS_ITEM)) .withVisible(canRead); navigationBtns.addButton(previousItem); MButton nextItemBtn = new MButton("", clickEvent -> { T item = previewForm.getBean(); previewForm.fireGotoNextItem(item); }).withIcon(FontAwesome.CHEVRON_RIGHT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.TOOLTIP_SHOW_NEXT_ITEM)) .withVisible(canRead); navigationBtns.addButton(nextItemBtn); layout.addComponent(navigationBtns); } if (popupButtonsControl.getComponentCount() > 0) { optionBtn.setContent(popupButtonsControl); layout.addComponent(optionBtn); } } return layout; }
From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentComplaintsPanel.java
private void addComplaintToolbar() { Button newComplaint = new Button("", FontAwesome.PLUS); newComplaint.addStyleName(ValoTheme.BUTTON_LINK); newComplaint.addClickListener(new Button.ClickListener() { @Override/* w w w . ja v a 2s. c om*/ public void buttonClick(Button.ClickEvent event) { Complaint newComplaint = new Complaint(); newComplaint.setAppointment(appointment); appointment.getComplaints().add(newComplaint); openComplaintWindow(newComplaint); } }); layout.addComponent(newComplaint); }