Example usage for com.vaadin.ui Button Button

List of usage examples for com.vaadin.ui Button Button

Introduction

In this page you can find the example usage for com.vaadin.ui Button Button.

Prototype

public Button(Resource icon, ClickListener listener) 

Source Link

Document

Creates a new push button with a click listener.

Usage

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

License:Open Source License

public void gotoComponentList() {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.COMPONENTS)));
    AppContext.addFragment("project/bug/component/list/" + UrlEncodeDecoder.encode(project.getId()),
            AppContext.getMessage(ComponentI18nEnum.VIEW_LIST_TITLE));
}

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

License:Open Source License

public void gotoComponentAdd() {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.COMPONENTS), new GotoComponentListener()));
    this.setLinkEnabled(true, 2);
    this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_ADD)));
    AppContext.addFragment("project/bug/component/add/" + UrlEncodeDecoder.encode(project.getId()),
            AppContext.getMessage(BugI18nEnum.BUTTON_NEW_COMPONENT));
}

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

License:Open Source License

public void gotoComponentEdit(final Component component) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.COMPONENTS), new GotoComponentListener()));
    this.setLinkEnabled(true, 2);
    this.addLink(generateBreadcrumbLink(component.getComponentname(), new Button.ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override/* w  w  w . j  a va2s  . c o m*/
        public void buttonClick(ClickEvent event) {
            EventBusFactory.getInstance().post(new BugComponentEvent.GotoRead(this, component.getId()));
        }
    }));
    this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT)));
    AppContext.addFragment(
            "project/bug/component/edit/" + UrlEncodeDecoder.encode(project.getId() + "/" + component.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_COMPONENT_EDIT, component.getComponentname()));
}

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

License:Open Source License

public void gotoComponentRead(Component component) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.COMPONENTS), new GotoComponentListener()));
    this.addLink(generateBreadcrumbLink(component.getComponentname()));
    AppContext.addFragment(//from   w w w  .  j  av a  2 s.  co m
            ProjectLinkGenerator.generateBugComponentPreviewLink(project.getId(), component.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_COMPONENT_READ, component.getComponentname()));
}

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

License:Open Source License

public void gotoStandupAdd(Date date) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.STANDUP), new GotoStandupListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_ADD)));

    AppContext.addFragment(//from  w w w  .  jav  a  2  s .  c om
            "project/standup/add/" + UrlEncodeDecoder
                    .encode(CurrentProjectVariables.getProjectId() + "/" + AppContext.formatDate(date)),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_STANDUP_FOR_DAY, AppContext.formatDate(date)));
}

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

License:Open Source License

public void gotoUserAdd() {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.USERS), new GotoUserListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(new Button(AppContext.getMessage(ProjectMemberI18nEnum.BUTTON_NEW_INVITEES)));
    AppContext.addFragment("project/user/add/" + UrlEncodeDecoder.encode(project.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_INVITE_MEMBERS));
}

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

License:Open Source License

public void gotoUserRead(SimpleProjectMember member) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.USERS), new GotoUserListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(generateBreadcrumbLink(member.getMemberFullName()));
    AppContext.addFragment(//w  w  w .  ja v a2 s.c o m
            "project/user/preview/" + UrlEncodeDecoder.encode(project.getId() + "/" + member.getUsername()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_MEMBER_READ, member.getMemberFullName()));
}

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

License:Open Source License

public void gotoUserEdit(SimpleProjectMember member) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.USERS), new GotoUserListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(generateBreadcrumbLink(member.getMemberFullName()));
    AppContext.addFragment(/*  w  w  w  . ja  v a  2 s  .  c  om*/
            "project/user/edit/" + UrlEncodeDecoder.encode(project.getId() + "/" + member.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_MEMBER_EDIT, member.getMemberFullName()));
}

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

License:Open Source License

public void gotoRoleRead(SimpleProjectRole role) {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.ROLES), new GotoRoleListener()));
    this.setLinkEnabled(true, 1);
    this.addLink(generateBreadcrumbLink(role.getRolename()));
    AppContext.addFragment(/*from  w w w.j a v  a 2s . co m*/
            "project/role/preview/" + UrlEncodeDecoder.encode(project.getId() + "/" + role.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_ROLE_READ, role.getRolename()));
}

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

License:Open Source License

public void gotoProjectSetting() {
    this.select(0);
    this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.FRA_SETTING),
            new GotoNotificationSetttingListener()));
    AppContext.addFragment("project/setting/" + UrlEncodeDecoder.encode(project.getId()),
            AppContext.getMessage(BreadcrumbI18nEnum.FRA_SETTING));
}