Example usage for com.vaadin.server FontAwesome CLIPBOARD

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

Introduction

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

Prototype

FontAwesome CLIPBOARD

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

Click Source Link

Usage

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

License:Open Source License

@Override
protected void onPreviewItem() {
    commentDisplay.loadComments("" + beanItem.getId());
    historyLogList.loadHistory(beanItem.getId());

    dateInfoComp.displayEntryDateTime(beanItem);
    peopleInfoComp.displayEntryPeople(beanItem);

    if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) {
        removeLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
        quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
    } else {//from   w w w  .  j ava 2 s  .  c  om
        addLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
        quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);

    }

}

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

License:Open Source License

@Override
protected ComponentContainer createButtonControls() {
    ProjectPreviewFormControlsGenerator<SimpleComponent> componentPreviewForm = new ProjectPreviewFormControlsGenerator<>(
            previewForm);/*w  ww .j a  v  a  2  s  .c  o  m*/
    final HorizontalLayout topPanel = componentPreviewForm
            .createButtonControls(ProjectRolePermissionCollections.COMPONENTS);
    quickActionStatusBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) {
                beanItem.setStatus(StatusI18nEnum.Open.name());
                ComponentReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
                quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
            } else {
                beanItem.setStatus(StatusI18nEnum.Closed.name());

                ComponentReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
                quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
            }

            ComponentService service = ApplicationContextUtil.getSpringBean(ComponentService.class);
            service.updateSelectiveWithSession(beanItem, AppContext.getUsername());

        }
    });

    quickActionStatusBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    componentPreviewForm.insertToControlBlock(quickActionStatusBtn);

    if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS)) {
        quickActionStatusBtn.setEnabled(false);
    }
    return topPanel;
}

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

License:Open Source License

@Override
protected void onPreviewItem() {
    commentDisplay.loadComments("" + beanItem.getId());
    historyLogList.loadHistory(beanItem.getId());
    dateInfoComp.displayEntryDateTime(beanItem);

    if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) {
        removeLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
        quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
    } else {//  ww w. j av  a 2 s  . c  om
        addLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
        quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);

    }

}

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

License:Open Source License

@Override
protected ComponentContainer createButtonControls() {
    ProjectPreviewFormControlsGenerator<Version> versionPreviewForm = new ProjectPreviewFormControlsGenerator<>(
            previewForm);/*from  ww w  .j a  va 2s.  c  om*/
    final HorizontalLayout topPanel = versionPreviewForm
            .createButtonControls(ProjectRolePermissionCollections.VERSIONS);

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

        @Override
        public void buttonClick(ClickEvent event) {
            if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) {
                beanItem.setStatus(StatusI18nEnum.Open.name());
                VersionReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
                quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
            } else {
                beanItem.setStatus(StatusI18nEnum.Closed.name());

                VersionReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
                quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
            }

            VersionService service = ApplicationContextUtil.getSpringBean(VersionService.class);
            service.updateSelectiveWithSession(beanItem, AppContext.getUsername());

        }
    });

    quickActionStatusBtn.setStyleName(UIConstants.THEME_GREEN_LINK);
    versionPreviewForm.insertToControlBlock(quickActionStatusBtn);

    if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.VERSIONS)) {
        quickActionStatusBtn.setEnabled(false);
    }

    return topPanel;
}

From source file:com.esofthead.mycollab.module.project.view.settings.ComponentReadViewImpl.java

License:Open Source License

@Override
protected void onPreviewItem() {
    activityComponent.loadActivities("" + beanItem.getId());
    dateInfoComp.displayEntryDateTime(beanItem);
    peopleInfoComp.displayEntryPeople(beanItem);

    if (tagViewComponent != null) {
        tagViewComponent.display(ProjectTypeConstants.BUG_COMPONENT, beanItem.getId());
    }//from   w  w w  .  j av  a 2 s  . co  m

    if (componentTimeLogComp != null) {
        componentTimeLogComp.displayTime(beanItem);
    }

    if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) {
        removeLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
        quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
    } else {
        addLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
        quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
    }

}

From source file:com.esofthead.mycollab.module.project.view.settings.ComponentReadViewImpl.java

License:Open Source License

@Override
protected ComponentContainer createButtonControls() {
    ProjectPreviewFormControlsGenerator<SimpleComponent> componentPreviewForm = new ProjectPreviewFormControlsGenerator<>(
            previewForm);/* ww  w  .  j  ava2  s.com*/
    HorizontalLayout topPanel = componentPreviewForm
            .createButtonControls(ProjectRolePermissionCollections.COMPONENTS);
    quickActionStatusBtn = new Button("", new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) {
                beanItem.setStatus(StatusI18nEnum.Open.name());
                ComponentReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
                quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
            } else {
                beanItem.setStatus(StatusI18nEnum.Closed.name());
                ComponentReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
                quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
            }

            ComponentService service = AppContextUtil.getSpringBean(ComponentService.class);
            service.updateSelectiveWithSession(beanItem, AppContext.getUsername());

        }
    });

    quickActionStatusBtn.setStyleName(UIConstants.BUTTON_ACTION);
    componentPreviewForm.insertToControlBlock(quickActionStatusBtn);

    if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS)) {
        quickActionStatusBtn.setEnabled(false);
    }
    return topPanel;
}

From source file:com.esofthead.mycollab.module.project.view.settings.VersionReadViewImpl.java

License:Open Source License

@Override
protected void onPreviewItem() {
    activityComponent.loadActivities("" + beanItem.getId());
    dateInfoComp.displayEntryDateTime(beanItem);

    if (tagViewComponent != null) {
        tagViewComponent.display(ProjectTypeConstants.BUG_VERSION, beanItem.getId());
    }//  ww  w  .j ava2s . c  o  m

    if (versionTimeLogComp != null) {
        versionTimeLogComp.displayTime(beanItem);
    }

    if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) {
        removeLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
        quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
    } else {
        addLayoutStyleName(UIConstants.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
        quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
    }
}

From source file:com.esofthead.mycollab.module.project.view.settings.VersionReadViewImpl.java

License:Open Source License

@Override
protected ComponentContainer createButtonControls() {
    ProjectPreviewFormControlsGenerator<Version> versionPreviewForm = new ProjectPreviewFormControlsGenerator<>(
            previewForm);/*from w  w w  . j  a va 2 s  .c o  m*/
    HorizontalLayout topPanel = versionPreviewForm
            .createButtonControls(ProjectRolePermissionCollections.VERSIONS);

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

        @Override
        public void buttonClick(ClickEvent event) {
            if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) {
                beanItem.setStatus(StatusI18nEnum.Open.name());
                VersionReadViewImpl.this.removeLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
                quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
            } else {
                beanItem.setStatus(StatusI18nEnum.Closed.name());
                VersionReadViewImpl.this.addLayoutStyleName(UIConstants.LINK_COMPLETED);
                quickActionStatusBtn.setCaption(AppContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
                quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
            }

            VersionService service = AppContextUtil.getSpringBean(VersionService.class);
            service.updateSelectiveWithSession(beanItem, AppContext.getUsername());
        }
    });

    quickActionStatusBtn.setStyleName(UIConstants.BUTTON_ACTION);
    versionPreviewForm.insertToControlBlock(quickActionStatusBtn);

    if (!CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.VERSIONS)) {
        quickActionStatusBtn.setEnabled(false);
    }

    return topPanel;
}

From source file:com.mycollab.module.project.view.settings.ComponentReadViewImpl.java

License:Open Source License

@Override
protected void onPreviewItem() {
    activityComponent.loadActivities("" + beanItem.getId());
    dateInfoComp.displayEntryDateTime(beanItem);
    peopleInfoComp.displayEntryPeople(beanItem);

    if (tagViewComponent != null) {
        tagViewComponent.display(ProjectTypeConstants.BUG_COMPONENT, beanItem.getId());
    }//from   w  ww  . ja v a  2s .co m

    if (componentTimeLogComp != null) {
        componentTimeLogComp.displayTime(beanItem);
    }

    if (StatusI18nEnum.Open.name().equals(beanItem.getStatus())) {
        removeLayoutStyleName(WebThemes.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
        quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
    } else {
        addLayoutStyleName(WebThemes.LINK_COMPLETED);
        quickActionStatusBtn.setCaption(UserUIContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
        quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
    }

}

From source file:com.mycollab.module.project.view.settings.ComponentReadViewImpl.java

License:Open Source License

@Override
protected HorizontalLayout createButtonControls() {
    ProjectPreviewFormControlsGenerator<SimpleComponent> componentPreviewForm = new ProjectPreviewFormControlsGenerator<>(
            previewForm);//from  ww w  .ja va  2s. com
    HorizontalLayout topPanel = componentPreviewForm
            .createButtonControls(ProjectRolePermissionCollections.COMPONENTS);
    quickActionStatusBtn = new MButton("", clickEvent -> {
        if (StatusI18nEnum.Closed.name().equals(beanItem.getStatus())) {
            beanItem.setStatus(StatusI18nEnum.Open.name());
            ComponentReadViewImpl.this.removeLayoutStyleName(WebThemes.LINK_COMPLETED);
            quickActionStatusBtn.setCaption(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLOSE));
            quickActionStatusBtn.setIcon(FontAwesome.ARCHIVE);
        } else {
            beanItem.setStatus(StatusI18nEnum.Closed.name());
            ComponentReadViewImpl.this.addLayoutStyleName(WebThemes.LINK_COMPLETED);
            quickActionStatusBtn.setCaption(UserUIContext.getMessage(GenericI18Enum.BUTTON_REOPEN));
            quickActionStatusBtn.setIcon(FontAwesome.CLIPBOARD);
        }

        ComponentService service = AppContextUtil.getSpringBean(ComponentService.class);
        service.updateSelectiveWithSession(beanItem, UserUIContext.getUsername());
    }).withStyleName(WebThemes.BUTTON_ACTION);
    componentPreviewForm.insertToControlBlock(quickActionStatusBtn);
    quickActionStatusBtn
            .setVisible(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.COMPONENTS));
    return topPanel;
}