Example usage for com.vaadin.server FontAwesome LIST_UL

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

Introduction

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

Prototype

FontAwesome LIST_UL

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.module.project.view.task.GanttChartViewImpl.java

License:Open Source License

public GanttChartViewImpl() {
    this.withMargin(new MarginInfo(false, true, true, true));

    MHorizontalLayout header = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, false))
            .withStyleName("hdr-view").withWidth("100%");
    header.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    Label headerText = new Label(FontAwesome.BAR_CHART_O.getHtml() + " Gantt chart", ContentMode.HTML);
    headerText.setStyleName(UIConstants.HEADER_TEXT);

    Button advanceDisplayBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/*from  ww w .ja  va 2 s .  co m*/
        public void buttonClick(Button.ClickEvent event) {
            EventBusFactory.getInstance().post(new TaskListEvent.GotoTaskListScreen(this, null));
        }
    });
    advanceDisplayBtn.setIcon(FontAwesome.SITEMAP);
    advanceDisplayBtn.setDescription(AppContext.getMessage(TaskGroupI18nEnum.ADVANCED_VIEW_TOOLTIP));

    Button simpleDisplayBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(Button.ClickEvent event) {
            TaskSearchCriteria searchCriteria = new TaskSearchCriteria();
            searchCriteria.setProjectid(new NumberSearchField(CurrentProjectVariables.getProjectId()));
            searchCriteria.setStatuses(
                    new SetSearchField<>(new String[] { OptionI18nEnum.StatusI18nEnum.Open.name() }));
            TaskFilterParameter taskFilter = new TaskFilterParameter(searchCriteria, "Task Search");
            taskFilter.setAdvanceSearch(true);
            EventBusFactory.getInstance().post(new TaskEvent.Search(this, taskFilter));
        }
    });
    simpleDisplayBtn.setIcon(FontAwesome.LIST_UL);
    simpleDisplayBtn.setDescription(AppContext.getMessage(TaskGroupI18nEnum.LIST_VIEW_TOOLTIP));

    Button chartDisplayBtn = new Button();
    chartDisplayBtn.setIcon(FontAwesome.BAR_CHART_O);

    ToggleButtonGroup viewButtons = new ToggleButtonGroup();
    viewButtons.addButton(simpleDisplayBtn);
    viewButtons.addButton(advanceDisplayBtn);
    viewButtons.addButton(chartDisplayBtn);
    viewButtons.setDefaultButton(chartDisplayBtn);

    header.with(headerText, viewButtons).withAlign(headerText, Alignment.MIDDLE_LEFT).expand(headerText);

    taskService = ApplicationContextUtil.getSpringBean(ProjectTaskService.class);

    HorizontalLayout ganttLayout = constructGanttChart();

    MVerticalLayout wrapContent = new MVerticalLayout().withSpacing(false).withMargin(false)
            .withStyleName("gantt-view").with(createControls(), ganttLayout);
    this.with(header, wrapContent);
}

From source file:com.esofthead.mycollab.module.project.view.task.TaskGroupDisplayViewImpl.java

License:Open Source License

private void constructUI() {
    this.removeAllComponents();
    this.withMargin(new MarginInfo(false, true, true, true));

    header = new MHorizontalLayout().withMargin(new MarginInfo(true, false, true, false))
            .withStyleName("hdr-view").withWidth("100%");
    header.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);

    this.taskGroupSelection = new PopupButton(
            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ACTIVE_TASK_GROUPS_TITLE));
    this.taskGroupSelection.setEnabled(CurrentProjectVariables.canRead(ProjectRolePermissionCollections.TASKS));
    this.taskGroupSelection.addStyleName("link");
    this.taskGroupSelection.addStyleName("hdr-text");
    taskGroupSelection.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.TASK_LIST));
    header.with(taskGroupSelection).withAlign(taskGroupSelection, Alignment.MIDDLE_LEFT)
            .expand(taskGroupSelection);

    final MVerticalLayout filterBtnLayout = new MVerticalLayout().withMargin(true).withSpacing(true)
            .withWidth("200px");

    final Button allTasksFilterBtn = new Button(
            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ALL_TASK_GROUPS_TITLE), new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override/*  ww w  . jav a 2s .com*/
                public void buttonClick(final ClickEvent event) {
                    TaskGroupDisplayViewImpl.this.taskGroupSelection.setPopupVisible(false);
                    TaskGroupDisplayViewImpl.this.taskGroupSelection
                            .setCaption(AppContext.getMessage(TaskGroupI18nEnum.FILTER_ALL_TASK_GROUPS_TITLE));
                    TaskGroupDisplayViewImpl.this.displayAllTaskGroups();
                }
            });
    allTasksFilterBtn.setStyleName("link");
    filterBtnLayout.addComponent(allTasksFilterBtn);

    final Button activeTasksFilterBtn = new Button(
            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ACTIVE_TASK_GROUPS_TITLE),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    TaskGroupDisplayViewImpl.this.taskGroupSelection.setPopupVisible(false);
                    TaskGroupDisplayViewImpl.this.taskGroupSelection.setCaption(
                            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ACTIVE_TASK_GROUPS_TITLE));
                    TaskGroupDisplayViewImpl.this.displayActiveTaskGroups();
                }
            });
    activeTasksFilterBtn.setStyleName("link");
    filterBtnLayout.addComponent(activeTasksFilterBtn);

    final Button archivedTasksFilterBtn = new Button(
            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ARCHIEVED_TASK_GROUPS_TITLE),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    TaskGroupDisplayViewImpl.this.taskGroupSelection.setCaption(
                            AppContext.getMessage(TaskGroupI18nEnum.FILTER_ARCHIEVED_TASK_GROUPS_TITLE));
                    TaskGroupDisplayViewImpl.this.taskGroupSelection.setPopupVisible(false);
                    TaskGroupDisplayViewImpl.this.displayInActiveTaskGroups();
                }
            });
    archivedTasksFilterBtn.setStyleName("link");
    filterBtnLayout.addComponent(archivedTasksFilterBtn);

    this.taskGroupSelection.setContent(filterBtnLayout);

    final Button newTaskListBtn = new Button(AppContext.getMessage(TaskI18nEnum.BUTTON_NEW_TASKGROUP),
            new Button.ClickListener() {
                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(final ClickEvent event) {
                    final TaskGroupAddWindow taskListWindow = new TaskGroupAddWindow(
                            TaskGroupDisplayViewImpl.this);
                    UI.getCurrent().addWindow(taskListWindow);
                }
            });
    newTaskListBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS));
    newTaskListBtn.setIcon(FontAwesome.PLUS);
    newTaskListBtn.setDescription(AppContext.getMessage(TaskI18nEnum.BUTTON_NEW_TASKGROUP));
    newTaskListBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    header.addComponent(newTaskListBtn);
    header.setComponentAlignment(newTaskListBtn, Alignment.MIDDLE_RIGHT);

    Button reOrderBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(final ClickEvent event) {
            EventBusFactory.getInstance().post(new TaskListEvent.ReoderTaskList(this, null));
        }
    });
    reOrderBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS));
    reOrderBtn.setIcon(FontAwesome.SORT);
    reOrderBtn.setStyleName(UIConstants.THEME_BLUE_LINK);
    reOrderBtn.setDescription(AppContext.getMessage(TaskI18nEnum.BUTTON_REODER_TASKGROUP));
    header.addComponent(reOrderBtn);
    header.setComponentAlignment(reOrderBtn, Alignment.MIDDLE_RIGHT);

    PopupButton exportButtonControl = new PopupButton();
    exportButtonControl.addStyleName(UIConstants.THEME_BLUE_LINK);
    exportButtonControl.setIcon(FontAwesome.EXTERNAL_LINK);
    exportButtonControl.setDescription("Export to file");

    VerticalLayout popupButtonsControl = new VerticalLayout();
    exportButtonControl.setContent(popupButtonsControl);
    exportButtonControl.setWidthUndefined();

    Button exportPdfBtn = new Button(AppContext.getMessage(FileI18nEnum.PDF));
    FileDownloader pdfDownloader = new FileDownloader(constructStreamResource(ReportExportType.PDF));
    pdfDownloader.extend(exportPdfBtn);
    exportPdfBtn.setIcon(FontAwesome.FILE_PDF_O);
    exportPdfBtn.setStyleName("link");
    popupButtonsControl.addComponent(exportPdfBtn);

    Button exportExcelBtn = new Button(AppContext.getMessage(FileI18nEnum.EXCEL));
    FileDownloader excelDownloader = new FileDownloader(constructStreamResource(ReportExportType.EXCEL));
    excelDownloader.extend(exportExcelBtn);
    exportExcelBtn.setIcon(FontAwesome.FILE_EXCEL_O);
    exportExcelBtn.setStyleName("link");
    popupButtonsControl.addComponent(exportExcelBtn);

    header.with(exportButtonControl).withAlign(exportButtonControl, Alignment.MIDDLE_LEFT);

    Button advanceDisplayBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            displayAdvancedView();
        }
    });
    advanceDisplayBtn.setIcon(FontAwesome.SITEMAP);
    advanceDisplayBtn.setDescription(AppContext.getMessage(TaskGroupI18nEnum.ADVANCED_VIEW_TOOLTIP));

    Button simpleDisplayBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            TaskSearchCriteria searchCriteria = new TaskSearchCriteria();
            searchCriteria.setProjectid(new NumberSearchField(CurrentProjectVariables.getProjectId()));
            searchCriteria.setStatuses(new SetSearchField<>(new String[] { StatusI18nEnum.Open.name() }));
            TaskFilterParameter taskFilter = new TaskFilterParameter(searchCriteria, "Task Search");
            taskFilter.setAdvanceSearch(true);
            moveToTaskSearch(taskFilter);
        }
    });
    simpleDisplayBtn.setIcon(FontAwesome.LIST_UL);
    simpleDisplayBtn.setDescription(AppContext.getMessage(TaskGroupI18nEnum.LIST_VIEW_TOOLTIP));

    Button chartDisplayBtn = new Button(null, new Button.ClickListener() {
        private static final long serialVersionUID = -5707546605789537298L;

        @Override
        public void buttonClick(ClickEvent event) {
            displayGanttChartView();
        }
    });
    chartDisplayBtn.setIcon(FontAwesome.BAR_CHART_O);

    viewButtons = new ToggleButtonGroup();
    viewButtons.addButton(simpleDisplayBtn);
    viewButtons.addButton(advanceDisplayBtn);
    viewButtons.addButton(chartDisplayBtn);
    viewButtons.setDefaultButton(advanceDisplayBtn);

    mainLayout = new MHorizontalLayout().withFullHeight().withFullWidth().withSpacing(true);
    this.taskListsWidget = new TaskGroupDisplayWidget();

    MVerticalLayout leftColumn = new MVerticalLayout().withMargin(new MarginInfo(false, true, false, false))
            .with(taskListsWidget);

    this.rightColumn = new MVerticalLayout().withWidth("300px")
            .withMargin(new MarginInfo(true, false, false, false));

    mainLayout.with(leftColumn, rightColumn).expand(leftColumn);

    FloatingComponent floatSidebar = FloatingComponent.floatThis(this.rightColumn);
    floatSidebar.setContainerId("main-body");

    implementTaskFilterButton();
    basicSearchView = new TaskSearchViewImpl();
    basicSearchView.getSearchHandlers().addSearchHandler(new SearchHandler<TaskSearchCriteria>() {
        @Override
        public void onSearch(TaskSearchCriteria criteria) {
            doSearch(criteria);
        }
    });
    basicSearchView.removeComponent(basicSearchView.getComponent(0));

    displayAdvancedView();
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ExperimentView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph//from ww  w.  j ava 2  s .co m
 */
void initView() {
    setWidth(100, Unit.PERCENTAGE);
    setResponsive(true);

    expview_content = new VerticalLayout();
    expview_content.setResponsive(true);
    expview_content.setMargin(new MarginInfo(true, true, false, false));

    expview_tab = new TabSheet();
    expview_tab.setWidth(100, Unit.PERCENTAGE);
    expview_tab.setResponsive(true);

    expview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    expview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    expview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    expview_content.addComponent(expview_tab);

    expview_tab.addTab(initDescription(), "General Information").setIcon(FontAwesome.INFO_CIRCLE);
    // expview_tab.addTab(initStatistics(), "Statistics").setIcon(FontAwesome.CHECK_CIRCLE);
    expview_tab.addTab(initProperties(), "Metadata").setIcon(FontAwesome.LIST_UL);
    expview_tab.addTab(initTable(), "Samples").setIcon(FontAwesome.TINT);
    initNoteComponent();
    expview_tab.addTab(innerNotesComponent).setIcon(FontAwesome.PENCIL);

    expview_content.setWidth(100, Unit.PERCENTAGE);
    this.addComponent(expview_content);
}