List of usage examples for com.vaadin.server FontAwesome SITEMAP
FontAwesome SITEMAP
To view the source code for com.vaadin.server FontAwesome SITEMAP.
Click Source Link
From source file:com.mycollab.module.project.view.task.TaskDashboardViewImpl.java
License:Open Source License
public TaskDashboardViewImpl() { this.withMargin(new MarginInfo(false, true, true, true)); taskSearchPanel = new TaskSearchPanel(); MHorizontalLayout groupWrapLayout = new MHorizontalLayout(); groupWrapLayout.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); groupWrapLayout.addComponent(new Label("Sort")); final ComboBox sortCombo = new ValueComboBox(false, AppContext.getMessage(GenericI18Enum.OPT_SORT_DESCENDING), AppContext.getMessage(GenericI18Enum.OPT_SORT_ASCENDING)); sortCombo.addValueChangeListener(new Property.ValueChangeListener() { @Override//w ww.j a v a 2 s. com public void valueChange(Property.ValueChangeEvent valueChangeEvent) { String sortValue = (String) sortCombo.getValue(); if (AppContext.getMessage(GenericI18Enum.OPT_SORT_ASCENDING).equals(sortValue)) { sortDirection = SearchCriteria.ASC; } else { sortDirection = SearchCriteria.DESC; } queryAndDisplayTasks(); } }); sortDirection = SearchCriteria.DESC; groupWrapLayout.addComponent(sortCombo); groupWrapLayout.addComponent(new Label("Group by")); final ComboBox groupCombo = new ValueComboBox(false, GROUP_DUE_DATE, GROUP_START_DATE, GROUP_CREATED_DATE, PLAIN_LIST, GROUP_USER); groupCombo.addValueChangeListener(valueChangeEvent -> { groupByState = (String) groupCombo.getValue(); queryAndDisplayTasks(); }); groupByState = GROUP_DUE_DATE; groupWrapLayout.addComponent(groupCombo); taskSearchPanel.addHeaderRight(groupWrapLayout); MButton printBtn = new MButton("", clickEvent -> { UI.getCurrent().addWindow(new TaskCustomizeReportOutputWindow(new LazyValueInjector() { @Override protected Object doEval() { return baseCriteria; } })); }).withIcon(FontAwesome.PRINT).withStyleName(UIConstants.BUTTON_OPTION) .withDescription(AppContext.getMessage(GenericI18Enum.ACTION_EXPORT)); groupWrapLayout.addComponent(printBtn); MButton newTaskBtn = new MButton(AppContext.getMessage(TaskI18nEnum.NEW), clickEvent -> { if (CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)) { SimpleTask newTask = new SimpleTask(); newTask.setProjectid(CurrentProjectVariables.getProjectId()); newTask.setSaccountid(AppContext.getAccountId()); newTask.setLogby(AppContext.getUsername()); UI.getCurrent().addWindow(new TaskAddWindow(newTask)); } }).withIcon(FontAwesome.PLUS).withStyleName(UIConstants.BUTTON_ACTION); newTaskBtn.setVisible(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.TASKS)); groupWrapLayout.addComponent(newTaskBtn); Button advanceDisplayBtn = new Button("List"); advanceDisplayBtn.setWidth("100px"); advanceDisplayBtn.setIcon(FontAwesome.SITEMAP); advanceDisplayBtn.setDescription("Advance View"); MButton kanbanBtn = new MButton("Kanban", clickEvent -> displayKanbanView()).withWidth("100px") .withIcon(FontAwesome.TH).withDescription("Kanban view"); 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(taskSearchPanel, mainLayout); }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java
License:Open Source License
/** * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment * Table Graph//from w w w .j a v a 2 s .com */ void initView() { patientViewContent = new VerticalLayout(); patientViewContent.setMargin(new MarginInfo(true, false, false, false)); // patientViewContent.setMargin(true); headerLabel = ""; patientViewTab = new TabSheet(); patientViewTab.setHeight("100%"); patientViewTab.setWidth("100%"); datasetComponent = new DatasetComponent(datahandler, state, resourceUrl); biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl, "Biological Samples"); measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data"); resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results"); statusComponent = new PatientStatusComponent(datahandler, state, resourceUrl); workflowComponent = new WorkflowComponent(wfController); uploadComponent = new AttachmentUploadComponent(); projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl); experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl); patientViewTab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS); patientViewTab.addStyleName(ValoTheme.TABSHEET_FRAMED); patientViewTab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR); // patientViewTab.addTab(initDescription()).setIcon(FontAwesome.INFO_CIRCLE); patientViewTab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE); patientViewTab.addTab(statusComponent).setIcon(FontAwesome.CHECK_CIRCLE); patientViewTab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP); // patientViewTab.addTab(initMemberSection()).setIcon(FontAwesome.USERS); // patientViewTab.addTab(initHLALayout()).setIcon(FontAwesome.BARCODE); // patientViewTab.addTab(initTable()).setIcon(FontAwesome.FLASK); patientViewTab.addTab(experimentComponent).setIcon(FontAwesome.FLASK); patientViewTab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE); patientViewTab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT); patientViewTab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL); patientViewTab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE); patientViewTab.addTab(workflowComponent).setIcon(FontAwesome.COGS); patientViewTab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD); patientViewTab.setImmediate(true); patientViewTab.addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { TabSheet tab = (TabSheet) event.getSource(); if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) { loadGraph(); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) { experimentComponent.updateUI(getCurrentBean()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) { datasetComponent.updateUI("project", getCurrentBean().getId()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) { measuredSamplesComponent.updateUI("project", getCurrentBean().getId(), "measured"); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) { biologicalSamplesComponent.updateUI(getCurrentBean().getId()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) { resultsComponent.updateUI("project", getCurrentBean().getId(), "results"); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Status")) { statusComponent.updateUI(getCurrentBean()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) { Map<String, String> args = new HashMap<String, String>(); args.put("id", getCurrentBean().getId()); args.put("type", "project"); workflowComponent.update(args); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) { // (get space from currentBean) uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1], datahandler.getOpenBisClient()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) { projectInformation.updateUI(getCurrentBean(), "patient"); } } }); patientViewContent.addComponent(patientViewTab); this.addComponent(patientViewContent); }
From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java
License:Open Source License
/** * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment * Table Graph//w ww. j a va 2s.c om */ void initView() { projectview_content = new VerticalLayout(); projectview_content.setMargin(new MarginInfo(true, false, false, false)); // labelContent = new VerticalLayout(); // labelContent.setMargin(new MarginInfo(true, false, true, false)); headerLabel = ""; // labelContent.addComponent(headerLabel); // projectview_content.addComponent(labelContent); projectview_tab = new TabSheet(); projectview_tab.setWidth("100%"); projectview_tab.setHeight("100%"); datasetComponent = new DatasetComponent(datahandler, state, resourceUrl); biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl, "Biological Samples"); measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data"); resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results"); workflowComponent = new WorkflowComponent(wfController); uploadComponent = new AttachmentUploadComponent(); projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl); experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl); // add styles to tab sheet projectview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS); projectview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED); // projectview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR); // add tabs to tabsheet projectview_tab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE); projectview_tab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP); // projectview_tab.addTab(initMemberSection()).setIcon(FontAwesome.USERS); projectview_tab.addTab(experimentComponent).setIcon(FontAwesome.FLASK); projectview_tab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE); projectview_tab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT); projectview_tab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL); projectview_tab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE); projectview_tab.addTab(workflowComponent).setIcon(FontAwesome.COGS); projectview_tab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD); projectview_tab.setImmediate(true); projectview_tab.addSelectedTabChangeListener(new SelectedTabChangeListener() { @Override public void selectedTabChange(SelectedTabChangeEvent event) { if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) { loadGraph(); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) { experimentComponent.updateUI(getCurrentBean()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) { datasetComponent.updateUI(navigateToLabel, getCurrentBean().getId()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) { measuredSamplesComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "measured"); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) { biologicalSamplesComponent.updateUI(getCurrentBean().getId()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) { resultsComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "results"); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) { Map<String, String> args = new HashMap<String, String>(); args.put("id", getCurrentBean().getId()); args.put("type", navigateToLabel); workflowComponent.update(args); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) { // (get space from currentBean) uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1], datahandler.getOpenBisClient()); } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) { projectInformation.updateUI(getCurrentBean(), "project"); } } }); // projectview_content.addComponent(initMenuBar()); projectview_content.addComponent(projectview_tab); // projectview_content.addComponent(initDescription()); // projectview_content.addComponent(initStatistics()); // projectview_content.addComponent(initTable()); // projectview_content.addComponent(initButtonLayout()); // projectview_content.addComponent(initGraph()); // use the component that is returned by initTable // projectview_content.setComponentAlignment(this.table, Alignment.TOP_CENTER); // projectview_content.setWidth("100%"); this.addComponent(projectview_content); }
From source file:fr.univlorraine.mondossierweb.MainUI.java
License:Apache License
/** * Cration des onglets pour l'enseignant *//*from w w w . j a v a2 s. c o m*/ private void ajoutOngletRecherche() { tabSheetEnseignant.setSizeFull(); //Onglet recherche rapide tabSheetEnseignant.addTab(rechercheRapideView, applicationContext.getMessage("mainUI.rechercherapide.title", null, getLocale()), FontAwesome.SEARCH); viewEnseignantTab.put(rechercheRapideView.NAME, 0); //Onglet recherche arborescente tabSheetEnseignant.addTab(rechercheArborescenteView, applicationContext.getMessage("mainUI.recherchearbo.title", null, getLocale()), FontAwesome.SITEMAP); viewEnseignantTab.put(rechercheArborescenteView.NAME, 1); //Onglet favoris tabSheetEnseignant.addTab(favorisView, "Favoris", FontAwesome.STAR_O); viewEnseignantTab.put(favorisView.NAME, 2); //On gre le changement d'onglet effectu par l'utilisateur tabSheetEnseignant.addSelectedTabChangeListener(new TabSheet.SelectedTabChangeListener() { public void selectedTabChange(SelectedTabChangeEvent event) { //On rcupre le tabSheet TabSheet tabsheet = event.getTabSheet(); //On rcupre la vue afficher View vue = (View) tabsheet.getSelectedTab(); //Si l'utilisateur veut afficher la vue des favoris if (vue instanceof FavorisView) { //On initialise la vue favorisView.init(); } //Si l'utilisateur veut afficher la vue de la liste des inscrits if (vue instanceof ListeInscritsView) { //On refresh la vue listeInscritsView.refresh(); } //Si l'utilisateur veut afficher la vue de la recherche arborescente if (vue instanceof RechercheArborescenteView) { //On refresh la vue rechercheArborescenteView.refresh(); } } }); //Ajout de l'onglet contenant la liste des inscrits addTabListeInscrits(); //Ajout du tabSheet dans le layout layoutOngletRecherche.addComponent(tabSheetEnseignant); //On passe le layout en sizeFull layoutOngletRecherche.setSizeFull(); //Le tabSheet prend toute la place disponible dans le layout layoutOngletRecherche.setExpandRatio(tabSheetEnseignant, 1); }