Example usage for com.vaadin.server FontAwesome EYE

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

Introduction

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

Prototype

FontAwesome EYE

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

Click Source Link

Usage

From source file:com.mycollab.community.module.project.view.service.BugComponentFactoryImpl.java

License:Open Source License

@Override
public AbstractComponent createFollowersPopupField(SimpleBug bug) {
    return new MetaFieldBuilder().withCaptionAndIcon(FontAwesome.EYE, "" + bug.getNumFollowers())
            .withDescription(UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS)).build();
}

From source file:com.mycollab.community.module.project.view.service.TaskComponentFactoryImpl.java

License:Open Source License

@Override
public AbstractComponent createFollowersPopupField(SimpleTask task) {
    return new MetaFieldBuilder()
            .withCaptionAndIcon(FontAwesome.EYE, "" + NumberUtils.zeroIfNull(task.getNumFollowers()))
            .withDescription(UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS)).build();
}

From source file:com.mycollab.community.module.project.view.service.TicketComponentFactoryImpl.java

License:Open Source License

@Override
public AbstractComponent createFollowersPopupField(ProjectTicket assignment) {
    return new MetaFieldBuilder()
            .withCaptionAndIcon(FontAwesome.EYE, "" + NumberUtils.zeroIfNull(assignment.getNumFollowers()))
            .withDescription(UserUIContext.getMessage(ShellI18nEnum.OPT_UPGRADE_PRO_INTRO,
                    UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS)))
            .build();/*  ww w  .j  a va2 s .c om*/
}

From source file:com.mycollab.module.crm.ui.components.CrmFollowersComp.java

License:Open Source License

public void displayFollowers(final V bean) {
    this.bean = bean;
    try {/*ww  w . j a  v  a2s.  c om*/
        typeId = (Integer) PropertyUtils.getProperty(bean, "id");
    } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
        LOG.error("Error", e);
        return;
    }
    this.removeAllComponents();

    MHorizontalLayout header = new MHorizontalLayout().withStyleName("info-hdr");
    header.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    Label followerHeader = new Label(
            FontAwesome.EYE.getHtml() + " " + UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS),
            ContentMode.HTML);
    header.addComponent(followerHeader);

    if (hasEditPermission()) {
        final PopupView addPopupView = new PopupView(UserUIContext.getMessage(GenericI18Enum.ACTION_MODIFY),
                new MVerticalLayout());
        addPopupView.addPopupVisibilityListener(popupVisibilityEvent -> {
            PopupView.Content content = addPopupView.getContent();
            if (popupVisibilityEvent.isPopupVisible()) {
                MVerticalLayout popupComponent = (MVerticalLayout) content.getPopupComponent();
                popupComponent.removeAllComponents();
                popupComponent.with(new ELabel(UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS))
                        .withStyleName(ValoTheme.LABEL_H3), new ModifyWatcherPopup());
            } else {
                MVerticalLayout popupComponent = (MVerticalLayout) content.getPopupComponent();
                ModifyWatcherPopup popup = (ModifyWatcherPopup) popupComponent.getComponent(1);
                List<MonitorItem> unsavedItems = popup.getUnsavedItems();
                monitorItemService.saveMonitorItems(unsavedItems);
                loadWatchers();
            }
        });
        header.addComponent(addPopupView);
    }
    header.addComponent(ELabel.fontIcon(FontAwesome.QUESTION_CIRCLE).withStyleName(WebThemes.INLINE_HELP)
            .withDescription(UserUIContext.getMessage(FollowerI18nEnum.FOLLOWER_EXPLAIN_HELP)));

    this.addComponent(header);
    watcherLayout = new MCssLayout().withFullWidth().withStyleName(WebThemes.FLEX_DISPLAY);
    this.addComponent(watcherLayout);
    loadWatchers();
}

From source file:com.mycollab.module.project.ui.components.ProjectFollowersComp.java

License:Open Source License

public void displayFollowers(final V bean) {
    this.bean = bean;
    try {//  w ww . java  2s  . c  om
        typeId = (Integer) PropertyUtils.getProperty(bean, "id");
    } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
        LOG.error("Error", e);
        return;
    }
    this.removeAllComponents();

    MHorizontalLayout header = new MHorizontalLayout().withStyleName("info-hdr");
    header.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    Label followerHeader = new Label(
            FontAwesome.EYE.getHtml() + " " + UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS),
            ContentMode.HTML);
    header.addComponent(followerHeader);

    if (hasEditPermission()) {
        final PopupView addPopupView = new PopupView(UserUIContext.getMessage(GenericI18Enum.ACTION_MODIFY),
                new MVerticalLayout());
        addPopupView.addPopupVisibilityListener(popupVisibilityEvent -> {
            PopupView.Content content = addPopupView.getContent();
            if (popupVisibilityEvent.isPopupVisible()) {
                MVerticalLayout popupComponent = (MVerticalLayout) content.getPopupComponent();
                popupComponent.removeAllComponents();
                popupComponent.with(new ELabel(UserUIContext.getMessage(FollowerI18nEnum.OPT_SUB_INFO_WATCHERS))
                        .withStyleName(ValoTheme.LABEL_H3), new ModifyWatcherPopup());
            } else {
                MVerticalLayout popupComponent = (MVerticalLayout) content.getPopupComponent();
                ModifyWatcherPopup popup = (ModifyWatcherPopup) popupComponent.getComponent(1);
                List<MonitorItem> unsavedItems = popup.getUnsavedItems();
                monitorItemService.saveMonitorItems(unsavedItems);
                loadWatchers();
            }
        });
        header.addComponent(addPopupView);
    }
    header.addComponent(ELabel.fontIcon(FontAwesome.QUESTION_CIRCLE).withStyleName(WebThemes.INLINE_HELP)
            .withDescription(UserUIContext.getMessage(FollowerI18nEnum.FOLLOWER_EXPLAIN_HELP)));

    this.addComponent(header);

    watcherLayout = new MCssLayout().withFullWidth().withStyleName(WebThemes.FLEX_DISPLAY);
    this.addComponent(watcherLayout);
    loadWatchers();
}

From source file:com.mycollab.module.project.view.FollowingTicketViewImpl.java

License:Open Source License

@Override
public void initContent() {
    removeAllComponents();//from w w  w. j a  v a2 s.c  o  m
    MHorizontalLayout header = new MHorizontalLayout().withFullWidth();

    ELabel layoutHeader = ELabel
            .h2(FontAwesome.EYE.getHtml() + " "
                    + UserUIContext.getMessage(FollowerI18nEnum.OPT_MY_FOLLOWING_TICKETS, 0))
            .withWidthUndefined();

    Button exportBtn = new Button(UserUIContext.getMessage(GenericI18Enum.ACTION_EXPORT),
            clickEvent -> exportButtonControl.setPopupVisible(true));
    exportButtonControl = new SplitButton(exportBtn);
    exportButtonControl.addStyleName(WebThemes.BUTTON_OPTION);
    exportButtonControl.setIcon(FontAwesome.EXTERNAL_LINK);

    OptionPopupContent popupButtonsControl = new OptionPopupContent();
    exportButtonControl.setContent(popupButtonsControl);

    Button exportPdfBtn = new Button(UserUIContext.getMessage(FileI18nEnum.PDF));
    FileDownloader pdfDownloader = new FileDownloader(constructStreamResource(ReportExportType.PDF));
    pdfDownloader.extend(exportPdfBtn);
    exportPdfBtn.setIcon(FontAwesome.FILE_PDF_O);
    popupButtonsControl.addOption(exportPdfBtn);

    Button exportExcelBtn = new Button(UserUIContext.getMessage(FileI18nEnum.EXCEL));
    FileDownloader excelDownloader = new FileDownloader(constructStreamResource(ReportExportType.EXCEL));
    excelDownloader.extend(exportExcelBtn);
    exportExcelBtn.setIcon(FontAwesome.FILE_EXCEL_O);
    popupButtonsControl.addOption(exportExcelBtn);

    header.with(layoutHeader, exportButtonControl).withAlign(layoutHeader, Alignment.MIDDLE_LEFT)
            .withAlign(exportButtonControl, Alignment.MIDDLE_RIGHT);
    this.addComponent(layoutHeader);

    searchPanel = new FollowingTicketSearchPanel();
    this.addComponent(searchPanel);

    this.ticketTable = new FollowingTicketTableDisplay();
    this.ticketTable.setMargin(new MarginInfo(true, false, false, false));
    this.addComponent(this.ticketTable);
}

From source file:com.mycollab.module.project.view.UserDashboardViewImpl.java

License:Open Source License

public UserDashboardViewImpl() {
    this.withMargin(false).withFullWidth();

    prjService = AppContextUtil.getSpringBean(ProjectService.class);
    prjKeys = prjService.getProjectKeysUserInvolved(UserUIContext.getUsername(), MyCollabUI.getAccountId());

    tabSheet = new TabSheet();
    tabSheet.addTab(buildDashboardComp(), UserUIContext.getMessage(GenericI18Enum.VIEW_DASHBOARD),
            FontAwesome.DASHBOARD);// w ww  .j a va2  s .  co  m
    tabSheet.addTab(buildProjectListComp(), UserUIContext.getMessage(ProjectI18nEnum.LIST),
            FontAwesome.BUILDING_O);
    tabSheet.addTab(buildFollowingTicketComp(), UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_FAVORITES),
            FontAwesome.EYE);
    if (!SiteConfiguration.isCommunityEdition()) {
        tabSheet.addTab(buildCalendarComp(), UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_CALENDAR),
                FontAwesome.CALENDAR);
    }

    //        tabSheet.addTab(buildSettingComp(), "Settings", FontAwesome.COG);

    tabSheet.addSelectedTabChangeListener(selectedTabChangeEvent -> {
        CssLayout comp = (CssLayout) tabSheet.getSelectedTab();
        comp.removeAllComponents();
        int tabIndex = tabSheet.getTabPosition(tabSheet.getTab(comp));
        if (tabIndex == 0) {
            UserProjectDashboardPresenter userProjectDashboardPresenter = PresenterResolver
                    .getPresenterAndInitView(UserProjectDashboardPresenter.class);
            userProjectDashboardPresenter.onGo(comp, null);
        } else if (tabIndex == 2) {
            FollowingTicketPresenter followingTicketPresenter = PresenterResolver
                    .getPresenterAndInitView(FollowingTicketPresenter.class);
            followingTicketPresenter.onGo(comp, null);
        } else if (tabIndex == 4) {
            SettingPresenter settingPresenter = PresenterResolver.getPresenter(SettingPresenter.class);
            settingPresenter.onGo(comp, null);
        } else if (tabIndex == 3) {
            ICalendarDashboardPresenter calendarPresenter = PresenterResolver
                    .getPresenterAndInitView(ICalendarDashboardPresenter.class);
            calendarPresenter.go(comp, null);
        } else if (tabIndex == 1) {
            ProjectListPresenter projectListPresenter = PresenterResolver
                    .getPresenterAndInitView(ProjectListPresenter.class);
            projectListPresenter.onGo(comp, null);
        }
    });

    this.with(setupHeader(), tabSheet).expand(tabSheet);
}

From source file:com.save.employee.request.RLDataContainer.java

public RLDataContainer(int employeeId) {
    this.employeeId = employeeId;

    addContainerProperty("control no.", String.class, null);
    addContainerProperty("reimbursement", Double.class, null);
    //        addContainerProperty("area", Integer.class, null);
    addContainerProperty("activity", String.class, null);
    addContainerProperty("date", String.class, null);
    addContainerProperty("venue", String.class, null);
    addContainerProperty("edit", String.class, null);
    addContainerProperty("liquidate", String.class, null);
    addContainerProperty("view", String.class, null);
    addContainerProperty("del", String.class, null);
    addContainerProperty("id", Integer.class, null);

    for (LiquidationForm lf : rls.getAllRLByEmployeeId(getEmployeeId())) {
        Item item = getItem(addItem());//from  w w  w  . j  a  v a 2s.  com
        item.getItemProperty("control no.").setValue(lf.getControlNo());
        item.getItemProperty("reimbursement").setValue(lf.getReimbursedAmount());
        //            item.getItemProperty("area").setValue(lf.getAreaCode());
        item.getItemProperty("activity").setValue(lf.getActivity());
        item.getItemProperty("date").setValue(
                CommonUtilities.convertDateWithFormat(lf.getDateOfActivity().toString(), "yyyy-MMM-dd"));
        item.getItemProperty("venue").setValue(lf.getVenue());
        item.getItemProperty("edit").setValue(FontAwesome.PENCIL.getHtml());
        item.getItemProperty("liquidate").setValue(FontAwesome.LEAF.getHtml());
        item.getItemProperty("view").setValue(FontAwesome.EYE.getHtml());
        item.getItemProperty("del").setValue(FontAwesome.TRASH_O.getHtml());
        item.getItemProperty("id").setValue(lf.getRequestId());
    }
}

From source file:com.terralcode.frontend.vista.widgets.listados.ListadoAlumnosView.java

private Component buildTable() {
    containerAlumnos = new BeanItemContainer<>(Alumno.class);

    table = new Table();
    table.setContainerDataSource(containerAlumnos);
    table.addGeneratedColumn("details", new Table.ColumnGenerator() {

        @Override//from www .  j  a  va  2  s  . c  om
        public Object generateCell(Table source, Object itemId, Object columnId) {
            Button detailsButton = new Button(FontAwesome.EYE);
            detailsButton.addStyleName(ValoTheme.BUTTON_SMALL);
            //detailsButton.setCaption(((CustomerCRM) itemId).getCode());
            detailsButton.addClickListener(new Button.ClickListener() {

                @Override
                public void buttonClick(Button.ClickEvent event) {
                    alumnoVista.open((Alumno) itemId);
                }
            });
            return detailsButton;
        }
    });
    table.setColumnHeader("nombre", "");
    table.setColumnWidth("nombre", 60);
    table.setColumnHeader("apellido1", "apellido");
    table.setColumnExpandRatio("nombre", 1);
    table.setColumnHeader("apellido2", "Apellido");
    //table.setColumnHeader("companyTaxCode", "CIF");
    table.setVisibleColumns(new Object[] { "nombre", "apellido1", "apellido2" });
    //table.setVisibleColumns(new Object[]{"details", "name", "mainContactInfo", "companyTaxCode"});
    table.setSizeFull();

    //addButtonAtTable(allCustomer);
    return table;
}

From source file:com.terralcode.gestion.frontend.view.widgets.appointment.AppointmentView.java

private void buildCustomer() {
    customer = new ComboBox();
    customer.setContainerDataSource(containerCustomers);
    customer.setFilteringMode(FilteringMode.CONTAINS);
    customer.setInputPrompt("Seleccione un cliente...");
    customer.setWidth("100%");
    //<editor-fold defaultstate="collapsed" desc="Adjust ContactInfo and Addresses according to the selected Customer">
    customer.addValueChangeListener(new ValueChangeListener() {

        @Override//w ww. ja v  a2  s .c om
        public void valueChange(Property.ValueChangeEvent event) {
            updateCustomerCombos((CustomerCRM) event.getProperty().getValue());
        }

        private void updateCustomerCombos(CustomerCRM customerCRM) {
            if (customerCRM != null) {
                containerAddresses.removeAllItems();
                address.setValue(null);
                containerAddresses.addAll(customerCRMService.find(customerCRM.getId()).getAddressList());
                if (containerAddresses.size() > 0) {
                    address.select(containerAddresses.getIdByIndex(0));
                }

                containerContacts.removeAllItems();
                contactInfo.setValue(null);
                containerContacts.addAll(customerCRMService.find(customerCRM.getId()).getContactInfoList());
                if (containerContacts.size() > 0) {
                    contactInfo.select(containerContacts.getIdByIndex(0));
                }
            } else {
                containerAddresses.removeAllItems();
                address.setValue(null);

                containerContacts.removeAllItems();
                contactInfo.setValue(null);
            }
        }
    });
    //</editor-fold>

    customerDetails = new Button(FontAwesome.EYE);
    customerDetails.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
    customerDetails.addClickListener(new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {
            if (appointment.getCustomer() != null) {
                customerView.open(appointment.getCustomer());
            }
        }
    });

    HorizontalLayout customerWrapper = new HorizontalLayout();
    customerWrapper.setCaption("Cliente");
    customerWrapper.addComponent(customer);
    customerWrapper.addComponent(customerDetails);
    customerWrapper.setWidth("100%");
    customerWrapper.setExpandRatio(customer, 1);
    rootLayout.addComponent(customerWrapper);

    //<editor-fold defaultstate="collapsed" desc="Antiguo buscador de clientes">
    //        Button searchCustomerBtn = new Button("Busca!");
    //        searchCustomerBtn.addClickListener(new Button.ClickListener() {
    //
    //            @Override
    //            public void buttonClick(Button.ClickEvent event) {
    //                CustomerFinderDialogWindow dlgWin = new CustomerFinderDialogWindow(appointment.getCustomer(), customerCRMService){
    //
    //                    @Override
    //                    protected void onButtonCancelClicked() {
    //                        this.close();
    //                    }
    //
    //                    @Override
    //                    protected void onButtonOKClicked() {
    //                        //appointment.setCustomer(this.getSelectedCustomer());
    //                        customer.setValue(this.getSelectedCustomer());
    //                        //updateCustomerCombos(appointment.getCustomer());
    //                        this.close();
    //                    }
    //
    //
    //
    //                };
    //                UI.getCurrent().addWindow(dlgWin);
    //                dlgWin.focus();
    //            }
    //        });
    //        rootLayout.addComponent(searchCustomerBtn);
    //</editor-fold>    
}