Example usage for com.vaadin.server FontAwesome SPINNER

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

Introduction

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

Prototype

FontAwesome SPINNER

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

Click Source Link

Usage

From source file:com.esofthead.mycollab.module.project.ui.ProjectAssetsUtil.java

License:Open Source License

public static FontAwesome getPhaseIcon(String status) {
    if (OptionI18nEnum.MilestoneStatus.Closed.name().equals(status)) {
        return FontAwesome.MINUS;
    } else if (OptionI18nEnum.MilestoneStatus.Future.name().equals(status)) {
        return FontAwesome.CLOCK_O;
    } else {/*w  w w. java2 s . c  o  m*/
        return FontAwesome.SPINNER;
    }
}

From source file:com.esofthead.mycollab.module.project.view.milestone.MilestoneListViewImpl.java

License:Open Source License

private void constructBody() {
    this.bodyContent = CustomLayoutExt.createLayout("milestoneView");

    bodyContent.setWidth("100%");
    bodyContent.setStyleName("milestone-view");

    final MHorizontalLayout closedHeaderLayout = new MHorizontalLayout();

    final Label closedHeader = new Label(FontAwesome.MINUS.getHtml() + " "
            + AppContext.getMessage(MilestoneI18nEnum.WIDGET_CLOSED_PHASE_TITLE), ContentMode.HTML);
    closedHeader.setSizeUndefined();//  w w w.j  av a  2 s .com
    closedHeaderLayout.addComponent(closedHeader);
    closedHeaderLayout.setComponentAlignment(closedHeader, Alignment.MIDDLE_CENTER);

    bodyContent.addComponent(closedHeaderLayout, "closed-header");
    closeContainer = new CssLayout();
    closeContainer.setStyleName("milestone-col");
    closeContainer.setWidth("100%");
    bodyContent.addComponent(this.closeContainer, "closed-milestones");

    final MHorizontalLayout inProgressHeaderLayout = new MHorizontalLayout();
    final Label inProgressHeader = new Label(FontAwesome.SPINNER.getHtml() + " "
            + AppContext.getMessage(MilestoneI18nEnum.WIDGET_INPROGRESS_PHASE_TITLE), ContentMode.HTML);
    inProgressHeader.setSizeUndefined();
    inProgressHeaderLayout.addComponent(inProgressHeader);
    inProgressHeaderLayout.setComponentAlignment(inProgressHeader, Alignment.MIDDLE_CENTER);

    bodyContent.addComponent(inProgressHeaderLayout, "in-progress-header");
    inProgressContainer = new CssLayout();
    inProgressContainer.setStyleName("milestone-col");
    inProgressContainer.setWidth("100%");
    bodyContent.addComponent(this.inProgressContainer, "in-progress-milestones");

    final MHorizontalLayout futureHeaderLayout = new MHorizontalLayout();
    final Label futureHeader = new Label(FontAwesome.CLOCK_O.getHtml() + " "
            + AppContext.getMessage(MilestoneI18nEnum.WIDGET_FUTURE_PHASE_TITLE), ContentMode.HTML);
    futureHeader.setSizeUndefined();
    futureHeaderLayout.addComponent(futureHeader);
    futureHeaderLayout.setComponentAlignment(futureHeader, Alignment.MIDDLE_CENTER);

    bodyContent.addComponent(futureHeaderLayout, "future-header");
    futureContainer = new CssLayout();
    futureContainer.setStyleName("milestone-col");
    futureContainer.setWidth("100%");
    bodyContent.addComponent(this.futureContainer, "future-milestones");

    this.addComponent(bodyContent);
}

From source file:com.esofthead.mycollab.module.project.view.milestone.MilestoneRoadmapViewImpl.java

License:Open Source License

@Override
protected void displayView() {
    initUI();//from   ww  w . j  a v a  2 s. c  o m
    createBtn.setEnabled(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.MILESTONES));

    baseCriteria = new MilestoneSearchCriteria();
    baseCriteria.setProjectIds(new SetSearchField<>(CurrentProjectVariables.getProjectId()));
    baseCriteria.setOrderFields(Arrays.asList(new SearchCriteria.OrderField("startdate", SearchCriteria.DESC),
            new SearchCriteria.OrderField("enddate", SearchCriteria.DESC)));
    displayMilestones();

    final MilestoneSearchCriteria tmpCriteria = BeanUtility.deepClone(baseCriteria);
    tmpCriteria.setStatuses(new SetSearchField<>(OptionI18nEnum.MilestoneStatus.Closed.name()));
    int totalCloseCount = milestoneService.getTotalCount(tmpCriteria);
    final CheckBox closeMilestoneSelection = new CheckBox(
            AppContext.getMessage(MilestoneI18nEnum.WIDGET_CLOSED_PHASE_TITLE) + " (" + totalCloseCount + ")",
            true);
    closeMilestoneSelection.setIcon(FontAwesome.MINUS_CIRCLE);
    filterPanel.addComponent(closeMilestoneSelection);

    tmpCriteria.setStatuses(new SetSearchField<>(OptionI18nEnum.MilestoneStatus.InProgress.name()));
    int totalInProgressCount = milestoneService.getTotalCount(tmpCriteria);
    final CheckBox inProgressMilestoneSelection = new CheckBox(
            AppContext.getMessage(MilestoneI18nEnum.WIDGET_INPROGRESS_PHASE_TITLE) + " (" + totalInProgressCount
                    + ")",
            true);
    inProgressMilestoneSelection.setIcon(FontAwesome.SPINNER);
    filterPanel.addComponent(inProgressMilestoneSelection);

    tmpCriteria.setStatuses(new SetSearchField<>(OptionI18nEnum.MilestoneStatus.Future.name()));
    int totalFutureCount = milestoneService.getTotalCount(tmpCriteria);
    final CheckBox futureMilestoneSelection = new CheckBox(
            AppContext.getMessage(MilestoneI18nEnum.WIDGET_FUTURE_PHASE_TITLE) + " (" + totalFutureCount + ")",
            true);

    closeMilestoneSelection.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
            displayMilestones(tmpCriteria, closeMilestoneSelection.getValue(),
                    inProgressMilestoneSelection.getValue(), futureMilestoneSelection.getValue());
        }
    });
    inProgressMilestoneSelection.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
            displayMilestones(tmpCriteria, closeMilestoneSelection.getValue(),
                    inProgressMilestoneSelection.getValue(), futureMilestoneSelection.getValue());
        }
    });
    futureMilestoneSelection.addValueChangeListener(new Property.ValueChangeListener() {
        @Override
        public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
            displayMilestones(tmpCriteria, closeMilestoneSelection.getValue(),
                    inProgressMilestoneSelection.getValue(), futureMilestoneSelection.getValue());
        }
    });
    futureMilestoneSelection.setIcon(FontAwesome.CLOCK_O);
    filterPanel.addComponent(futureMilestoneSelection);
}

From source file:com.fnc.view.ui.AlphaListMainUI.java

Button alphaListButton() {
    Button button = new Button("ALPHA LIST");
    button.setWidth("100%");
    button.setIcon(FontAwesome.SPINNER);
    button.addStyleName(ValoTheme.BUTTON_PRIMARY);
    button.addStyleName(ValoTheme.BUTTON_SMALL);
    button.addClickListener((Button.ClickEvent event) -> {
        status.setValue(" Loading...");
        current = 0.0;//from ww w .j  av a 2  s  .c om
        dataSize = es.getEmployeeByBranch(getBranchId()).size();
        populateDataGrid();
    });

    return button;
}

From source file:com.fnc.view.ui.thirteenth.ThirteenthMonthUI.java

Button button() {
    Button button = new Button("ALPHA LIST");
    button.setWidth("100%");
    button.setIcon(FontAwesome.SPINNER);
    button.addStyleName(ValoTheme.BUTTON_PRIMARY);
    button.addStyleName(ValoTheme.BUTTON_SMALL);
    button.addClickListener((Button.ClickEvent event) -> {
        status.setValue(" Loading...");
        current = 0.0;//from w  w w.ja v  a 2 s  . c  o  m
        //            dataSize = es.getEmployeeByBranch(getBranchId()).size();
        //            populateDataGrid();
    });

    return button;
}

From source file:com.hris.payroll.alphalist.AlphaListMainUI.java

private Button alphaListButton() {
    alphaListBtn.setWidth("200px");
    alphaListBtn.setIcon(FontAwesome.SPINNER);
    alphaListBtn.addStyleName(ValoTheme.BUTTON_PRIMARY);
    alphaListBtn.addStyleName(ValoTheme.BUTTON_SMALL);
    alphaListBtn.setDisableOnClick(true);
    alphaListBtn.addClickListener((Button.ClickEvent event) -> {
        status.setValue(" Loading... ");
        current = 1.0;//from  www. j av  a 2  s .co  m
        dataSize = es.findEmployeeByBranchForAlphaList(getBranchId(), employmentStatus.getValue().toString(),
                CommonUtil.convertStringToInteger(year.getValue().toString())).size();

        List<EmployeePersonalInformation> employeeLists = es.findEmployeeByBranchForAlphaList(getBranchId(),
                employmentStatus.getValue().toString(),
                CommonUtil.convertStringToInteger(year.getValue().toString()));
        if (employeeLists.isEmpty()) {
            Notification.show("NO DATA FOUND!!!", Notification.Type.WARNING_MESSAGE);
            alphaListBtn.setEnabled(true);
            return;
        }

        populateDataGrid();
    });

    return alphaListBtn;
}

From source file:com.hris.payroll.thirteenthmonth.ThirteenthMonth.java

private Button generate13thMonth() {
    Button button = new Button("13th MONTH");
    button.setWidth("200px");
    button.setIcon(FontAwesome.SPINNER);
    button.addStyleName(ValoTheme.BUTTON_PRIMARY);
    button.addStyleName(ValoTheme.BUTTON_SMALL);
    button.addClickListener((Button.ClickEvent event) -> {
        status.setValue(" Loading...");
        current = 1.0;//from w ww.  ja  v  a  2 s .co  m
        dataSize = es.findEmployeeByBranch(getBranchId(), employmentStatus.getValue().toString(),
                CommonUtil.convertStringToInteger(year.getValue().toString())).size();

        populateDataGrid();
    });

    return button;
}

From source file:com.mycollab.mobile.module.project.view.milestone.MilestoneListViewImpl.java

License:Open Source License

@Override
protected Component buildToolbar() {
    Toolbar toolbar = new Toolbar();
    closedMilestoneBtn = new Button(UserUIContext.getMessage(MilestoneI18nEnum.WIDGET_CLOSED_PHASE_TITLE),
            clickEvent -> displayStatus(MilestoneStatus.Closed));
    closedMilestoneBtn.setIcon(FontAwesome.MINUS_CIRCLE);
    toolbar.addComponent(closedMilestoneBtn);

    inProgressMilestoneBtn = new Button(
            UserUIContext.getMessage(MilestoneI18nEnum.WIDGET_INPROGRESS_PHASE_TITLE),
            clickEvent -> displayStatus(MilestoneStatus.InProgress));
    inProgressMilestoneBtn.setIcon(FontAwesome.SPINNER);

    futureMilestoneBtn = new Button(UserUIContext.getMessage(MilestoneI18nEnum.WIDGET_FUTURE_PHASE_TITLE),
            clickEvent -> displayStatus(MilestoneStatus.Future));
    futureMilestoneBtn.setIcon(FontAwesome.CLOCK_O);

    toolbar.addComponents(closedMilestoneBtn, inProgressMilestoneBtn, futureMilestoneBtn);
    return toolbar;
}

From source file:com.mycollab.module.project.ui.ProjectAssetsManager.java

License:Open Source License

public static FontAwesome getMilestoneStatus(String status) {
    if (MilestoneStatus.Closed.name().equals(status)) {
        return FontAwesome.MINUS_CIRCLE;
    } else if (MilestoneStatus.InProgress.name().equals(status)) {
        return FontAwesome.CLOCK_O;
    } else {//from   ww w  .j a  v  a 2 s .co  m
        return FontAwesome.SPINNER;
    }
}

From source file:com.mycollab.module.project.ui.ProjectAssetsUtil.java

License:Open Source License

public static FontAwesome getPhaseIcon(String status) {
    if (MilestoneStatus.Closed.name().equals(status)) {
        return FontAwesome.MINUS_CIRCLE;
    } else if (MilestoneStatus.Future.name().equals(status)) {
        return FontAwesome.CLOCK_O;
    } else {//from   w  w  w . j  a va 2s.c  om
        return FontAwesome.SPINNER;
    }
}