List of usage examples for com.vaadin.ui Button Button
public Button(Resource icon, ClickListener listener)
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoTaskRead(SimpleTask task) { this.select(0); this.addLink( new Button(AppContext.getMessage(BreadcrumbI18nEnum.TASKS), new GotoTaskAssignmentDashboard())); this.setLinkEnabled(true, 1); this.addLink(generateBreadcrumbLink( AppContext.getMessage(BreadcrumbI18nEnum.FRA_TASK_READ, task.getTaskname()))); AppContext.addFragment(//from ww w.ja v a 2s . co m ProjectLinkGenerator.generateTaskPreviewLink(task.getTaskkey(), task.getProjectShortname()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_TASK_READ, task.getTaskname())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoTaskEdit(final SimpleTask task) { this.select(0); this.addLink( new Button(AppContext.getMessage(BreadcrumbI18nEnum.TASKS), new GotoTaskAssignmentDashboard())); this.setLinkEnabled(true, 1); this.addLink( generateBreadcrumbLink(AppContext.getMessage(BreadcrumbI18nEnum.FRA_TASK_READ, task.getTaskname()), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new TaskEvent.GotoRead(this, task.getId())); }/* w w w. j a v a 2s.c o m*/ })); this.setLinkEnabled(true, 2); this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT))); AppContext.addFragment( ProjectLinkGenerator.generateTaskEditLink(task.getTaskkey(), task.getProjectShortname()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_TASK_EDIT, task.getTaskname())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoBugList() { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS_DASHBOARD), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.FRA_BUG_LIST))); AppContext.addFragment("project/bug/list/" + UrlEncodeDecoder.encode(project.getId()), AppContext.getMessage(BugI18nEnum.VIEW_LIST_TITLE)); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoBugAdd() { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS_DASHBOARD), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugListListener())); this.setLinkEnabled(true, 2); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.FRA_BUG_NEW))); AppContext.addFragment("project/bug/add/" + UrlEncodeDecoder.encode(project.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_BUG_NEW)); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoBugEdit(final SimpleBug bug) { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS_DASHBOARD), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugListListener())); this.setLinkEnabled(true, 2); this.addLink(generateBreadcrumbLink(bug.getSummary(), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override//from w ww. jav a2 s .co m public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new BugEvent.GotoRead(this, bug.getId())); } })); this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT))); AppContext.addFragment(ProjectLinkGenerator.generateBugEditLink(bug.getBugkey(), bug.getProjectShortName()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_BUG_EDIT, bug.getSummary())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoBugRead(SimpleBug bug) { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS_DASHBOARD), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugListListener())); this.setLinkEnabled(true, 2); this.addLink(generateBreadcrumbLink(bug.getSummary())); AppContext.addFragment(/*from ww w . j a v a 2 s .co m*/ ProjectLinkGenerator.generateBugPreviewLink(bug.getBugkey(), bug.getProjectShortName()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_BUG_READ, bug.getSummary())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoVersionList() { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.VERSIONS))); AppContext.addFragment("project/bug/version/list/" + UrlEncodeDecoder.encode(project.getId()), AppContext.getMessage(VersionI18nEnum.VIEW_LIST_TITLE)); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoVersionAdd() { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.VERSIONS), new GotoVersionListener())); this.setLinkEnabled(true, 2); this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_ADD))); AppContext.addFragment("project/bug/version/add/" + UrlEncodeDecoder.encode(project.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_VERSION_NEW)); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoVersionEdit(final Version version) { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.VERSIONS), new GotoVersionListener())); this.setLinkEnabled(true, 2); this.addLink(generateBreadcrumbLink(version.getVersionname(), new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override//from w ww .j av a2 s. c o m public void buttonClick(ClickEvent event) { EventBusFactory.getInstance().post(new BugVersionEvent.GotoRead(this, version.getId())); } })); this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_EDIT))); AppContext.addFragment( "project/bug/version/edit/" + UrlEncodeDecoder.encode(project.getId() + "/" + version.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_VERSION_EDIT, version.getVersionname())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoVersionRead(Version version) { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.BUGS), new GotoBugDashboardListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.VERSIONS), new GotoVersionListener())); this.setLinkEnabled(true, 2); this.addLink(generateBreadcrumbLink(version.getVersionname())); AppContext.addFragment(ProjectLinkGenerator.generateBugVersionPreviewLink(project.getId(), version.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_VERSION_READ, version.getVersionname())); }