Example usage for com.vaadin.server FontAwesome COGS

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

Introduction

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

Prototype

FontAwesome COGS

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.module.project.view.bug.components.BugRowComponent.java

License:Open Source License

public BugRowComponent(final SimpleBug bug) {
    this.bug = bug;
    withSpacing(true).withMargin(false).withFullWidth().addStyleName(UIConstants.BORDER_LIST_ROW);

    bugSettingPopupBtn = new PopupButton();
    bugSettingPopupBtn.setIcon(FontAwesome.COGS);
    bugSettingPopupBtn.addStyleName(UIConstants.BUTTON_ICON_ONLY);
    OptionPopupContent filterBtnLayout = createPopupContent();
    bugSettingPopupBtn.setContent(filterBtnLayout);

    final ToggleBugSummaryField bugWrapper = new ToggleBugSummaryField(bug);

    BugPopupFieldFactory popupFieldFactory = ViewManager.getCacheComponent(BugPopupFieldFactory.class);
    MHorizontalLayout headerLayout = new MHorizontalLayout().withFullWidth()
            .withMargin(new MarginInfo(false, true, false, false));
    Component priorityField = popupFieldFactory.createPriorityPopupField(bug);
    Component assigneeField = popupFieldFactory.createAssigneePopupField(bug);
    headerLayout.with(bugSettingPopupBtn, priorityField, assigneeField, bugWrapper).expand(bugWrapper);

    CssLayout footer = new CssLayout();

    Component commentsField = popupFieldFactory.createCommentsPopupField(bug);
    footer.addComponent(commentsField);/*  w w w .j a  va 2  s. c  o m*/

    Component followerField = popupFieldFactory.createFollowersPopupField(bug);
    footer.addComponent(followerField);

    Component statusField = popupFieldFactory.createStatusPopupField(bug);
    footer.addComponent(statusField);

    Component milestoneField = popupFieldFactory.createMilestonePopupField(bug);
    footer.addComponent(milestoneField);

    String deadlineTooltip = String.format("%s: %s", AppContext.getMessage(GenericI18Enum.FORM_DUE_DATE),
            AppContext.formatDate(bug.getDuedate()));
    AbstractComponent deadlineField = popupFieldFactory.createDeadlinePopupField(bug);
    deadlineField.setDescription(deadlineTooltip);
    footer.addComponent(deadlineField);

    Component startDateField = popupFieldFactory.createStartDatePopupField(bug);
    footer.addComponent(startDateField);

    Component endDateField = popupFieldFactory.createEndDatePopupField(bug);
    footer.addComponent(endDateField);

    if (!SiteConfiguration.isCommunityEdition()) {
        Component billableHoursView = popupFieldFactory.createBillableHoursPopupField(bug);
        footer.addComponent(billableHoursView);

        Component nonBillableHoursView = popupFieldFactory.createNonbillableHoursPopupField(bug);
        footer.addComponent(nonBillableHoursView);
    }

    this.with(headerLayout, footer);
}

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

License:Open Source License

public TaskRowRenderer(final SimpleTask task) {
    this.task = task;
    withSpacing(true).withMargin(false).withFullWidth().addStyleName(UIConstants.BORDER_LIST_ROW);

    taskSettingPopupBtn = new PopupButton();
    taskSettingPopupBtn.setIcon(FontAwesome.COGS);
    taskSettingPopupBtn.addStyleName(UIConstants.BUTTON_ICON_ONLY);
    OptionPopupContent filterBtnLayout = createPopupContent();
    taskSettingPopupBtn.setContent(filterBtnLayout);

    toogleTaskField = new ToggleTaskSummaryField(task);
    MHorizontalLayout headerLayout = new MHorizontalLayout().withFullWidth()
            .withMargin(new MarginInfo(false, true, false, false));

    TaskPopupFieldFactory popupFieldFactory = ViewManager.getCacheComponent(TaskPopupFieldFactory.class);
    AbstractComponent priorityField = popupFieldFactory.createPriorityPopupField(task);
    AbstractComponent assigneeField = popupFieldFactory.createAssigneePopupField(task);
    headerLayout.with(taskSettingPopupBtn, priorityField, assigneeField, toogleTaskField)
            .expand(toogleTaskField);/*from  w ww. ja  v a2s  .  com*/

    CssLayout footer = new CssLayout();

    AbstractComponent commentField = popupFieldFactory.createCommentsPopupField(task);
    footer.addComponent(commentField);

    AbstractComponent followerView = popupFieldFactory.createFollowersPopupField(task);
    footer.addComponent(followerView);

    AbstractComponent statusField = popupFieldFactory.createStatusPopupField(task);
    footer.addComponent(statusField);

    AbstractComponent milestoneField = popupFieldFactory.createMilestonePopupField(task);
    footer.addComponent(milestoneField);

    AbstractComponent percentageField = popupFieldFactory.createPercentagePopupField(task);
    footer.addComponent(percentageField);

    String deadlineTooltip = String.format("%s: %s", AppContext.getMessage(GenericI18Enum.FORM_DUE_DATE),
            AppContext.formatDate(task.getDeadline()));
    AbstractComponent deadlineField = popupFieldFactory.createDeadlinePopupField(task);
    deadlineField.setDescription(deadlineTooltip);
    footer.addComponent(deadlineField);

    AbstractComponent startDateField = popupFieldFactory.createStartDatePopupField(task);
    footer.addComponent(startDateField);

    AbstractComponent endDateField = popupFieldFactory.createEndDatePopupField(task);
    footer.addComponent(endDateField);

    if (!SiteConfiguration.isCommunityEdition()) {
        AbstractComponent billableHoursField = popupFieldFactory.createBillableHoursPopupField(task);
        footer.addComponent(billableHoursField);

        AbstractComponent nonBillableHours = popupFieldFactory.createNonBillableHoursPopupField(task);
        footer.addComponent(nonBillableHours);
    }

    this.with(headerLayout, footer);
}

From source file:com.hybridbpm.ui.view.AdministrationView.java

License:Apache License

public AdministrationView() {
    Design.read(this);
    Responsive.makeResponsive(panelLayout);
    tabSheet.addTab(systemParametersLayout, "Parameters", FontAwesome.WRENCH);
    tabSheet.addTab(allProgressLayout, "Processes", FontAwesome.COGS);
    //        tabSheet.addTab(viewsLayout, "Views", FontAwesome.LIST);
    tabSheet.addSelectedTabChangeListener(this);
    systemParametersLayout.refreshTable();
    allProgressLayout.setTabSheet(tabSheet);
}

From source file:com.javalego.store.environment.BaseEnvironment.java

@Override
public synchronized Collection<RepositoryIcons<Icon>> getRepositoriesIcons() throws LocalizedException {

    if (repositories != null) {
        return repositories;
    }/*from   w w  w.j a v a  2s . c o  m*/

    repositories = new ArrayList<RepositoryIcons<Icon>>();

    // Iconos de redes sociales usando FonAwesome icons.
    FontAwesomeIcons fa = FontAwesomeIcons.getCurrent();
    fa.addIcon(MenuIcons2.BOOK, FontAwesome.BOOK);
    fa.addIcon(MenuIcons2.MONITOR, FontAwesome.DESKTOP);
    fa.addIcon(MenuIcons2.SOURCECODE, FontAwesome.CODE);
    fa.addIcon(MenuIcons2.GITHUB, FontAwesome.GITHUB);
    fa.addIcon(MenuIcons2.METRICS, FontAwesome.BAR_CHART_O);
    fa.addIcon(MenuIcons2.WEB, FontAwesome.GLOBE);
    fa.addIcon(MenuIcons2.TWITTER, FontAwesome.TWITTER);
    fa.addIcon(MenuIcons2.FORUM, FontAwesome.USERS);
    fa.addIcon(MenuIcons2.BLOG, FontAwesome.WORDPRESS);
    fa.addIcon(MenuIcons2.LINKEDIN, FontAwesome.LINKEDIN);
    fa.addIcon(MenuIcons2.FACEBOOK, FontAwesome.FACEBOOK);
    fa.addIcon(MenuIcons2.GOOGLEPLUS, FontAwesome.GOOGLE_PLUS);
    fa.addIcon(MenuIcons2.EMAIL, FontAwesome.ENVELOPE);
    fa.addIcon(MenuIcons2.TOOLS, FontAwesome.COGS);
    fa.addIcon(MenuIcons2.LICENSE, FontAwesome.FILE);

    // Resto de iconos
    ResourceIconsVaadin rep = ResourceIconsVaadin.getCurrent();
    //rep.setLocale(Locale.US);
    rep.load(MenuIcons.class, "/menu_icons");
    rep.load(MenuIcons2.class, "/menu_icons2");
    rep.load(ProviderIcons.class, "/provider_icons");
    rep.load(IconEditor.class, "/icons_editor");

    repositories.add(fa);
    repositories.add(rep);

    return repositories;
}

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  ww . ja va  2  s  .  c  o  m*/
 */
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/* www.j  av a2 s. co  m*/
 */
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.views.AdminView.java

License:Apache License

/**
 * Initialise la vue//from  w  w w  .  j  ava 2s . co m
 */
@PostConstruct
public void init() {
    //On vrifie le droit d'accder  la vue
    if (userController.userCanAccessAdminView()) {
        removeAllComponents();
        /* Style */
        setMargin(true);
        setSpacing(true);

        /* En-tete menu large */
        topLayout = new HorizontalLayout();
        topLayout.addStyleName(ValoTheme.MENU_TITLE);
        topLayout.setWidth(100, Unit.PERCENTAGE);
        topLayout.setSpacing(true);

        Label Apptitle = new Label(environment.getRequiredProperty("app.name"));
        Apptitle.addStyleName(ValoTheme.LABEL_HUGE);
        Apptitle.addStyleName(ValoTheme.LABEL_BOLD);

        Label versionLabel = new Label("v" + environment.getRequiredProperty("app.version"));
        versionLabel.addStyleName(ValoTheme.LABEL_TINY);

        VerticalLayout appTitleLayout = new VerticalLayout(Apptitle, versionLabel);
        topLayout.addComponent(appTitleLayout);
        topLayout.setComponentAlignment(appTitleLayout, Alignment.MIDDLE_LEFT);
        topLayout.setExpandRatio(appTitleLayout, 1);

        addComponent(topLayout);

        // Titre 
        /*Label title = new Label(applicationContext.getMessage(NAME + ".title", null, getLocale()));
        title.addStyleName(ValoTheme.LABEL_H1);
        addComponent(title);*/

        // Texte 
        //addComponent(new Label(applicationContext.getMessage(NAME + ".message", null, getLocale()), ContentMode.HTML));

        tabSheetGlobal = new TabSheet();
        tabSheetGlobal.setSizeFull();
        tabSheetGlobal.addStyleName(ValoTheme.TABSHEET_FRAMED);

        //ajout de l'onglet principal 'parametres'
        layoutConfigApplication = new VerticalLayout();
        layoutConfigApplication.setSizeFull();
        ajoutGestionParametresApplicatifs();
        tabSheetGlobal.addTab(layoutConfigApplication, "Paramtres de l'application", FontAwesome.COGS);

        //ajout de l'onglet 'swap'
        layoutSwapUser = new VerticalLayout();
        layoutSwapUser.setSizeFull();
        ajoutGestionSwap();
        tabSheetGlobal.addTab(layoutSwapUser, "Swap utilisateur", FontAwesome.GROUP);

        tabSheetGlobal.setSelectedTab(tabSelectedPosition);
        //Ce tabSheet sera align  droite
        //tabSheetGlobal.addStyleName("right-aligned-tabs");

        //Le menu horizontal pour les enseignants est dfinit comme tant le contenu de la page
        addComponent(tabSheetGlobal);
        setExpandRatio(tabSheetGlobal, 1);
    }
}

From source file:org.inakirj.imagerulette.MyUI.java

License:Open Source License

@Override
protected void init(VaadinRequest vaadinRequest) {

    TabBarView tabManager = new TabBarView();
    tabManager.addStyleName("tab-style");

    Button addImage = new Button();
    addImage.setIcon(FontAwesome.PLUS);/*from w w  w. j ava2 s .  c om*/
    addImage.addClickListener(e -> addImageRow());

    tabContent1 = new NavigationView();
    tabContent2 = new NavigationView();
    tabContent3 = new NavigationView();

    // Upload images tab
    tabContent1.setCaption("Set image URLs");
    tabContent1.setContent(new DiceGallerySetupView());
    tabContent1.setData("1");
    tabContent1.setRightComponent(addImage);
    Tab tabUpload = tabManager.addTab(tabContent1, "UPLOAD");
    tabUpload.setIcon(FontAwesome.LINK);

    // Setup tab
    tabContent2.setCaption("Create your dice pool");
    tabContent2.addStyleName("view-background");
    Button resetSliders = new Button("");
    resetSliders.addClickListener(e -> onResetSliders());
    resetSliders.addStyleName("reset-button");
    resetSliders.setIcon(FontAwesome.REPEAT);
    tabContent2.setRightComponent(resetSliders);
    tabContent2.setContent(new DiceURLSetupView(tabContent3));
    tabContent2.setData("2");
    Tab tabSetup = tabManager.addTab(tabContent2, "SETUP");
    tabSetup.setIcon(FontAwesome.COGS);

    // Dice tab
    tabContent3.setCaption("Roll the dice");
    tabContent3.setContent(new DicePlayView());
    tabContent3.setData("3");
    Tab tabPlay = tabManager.addTab(tabContent3, "DICE");
    tabPlay.setIcon(FontAwesome.CUBES);
    tabContent3.setEnabled(false);

    tabManager.setSelectedTab(tabContent2);
    tabManager.addListener(new SelectedTabChangeListener() {

        /** The Constant serialVersionUID. */
        private static final long serialVersionUID = -5418597313724716790L;

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            NavigationView tab = (NavigationView) (event.getTabSheet().getSelelectedTab()).getComponent();
            if (tab.getData().equals("3") && tab.isEnabled()) {
                ((DicePlayView) tab.getContent()).setupLottery(generateLotteryList);
            }
        }
    });
    setContent(tabManager);
}