1 package org.telscenter.pas.service;
2
3 import java.awt.Dialog;
4 import java.awt.event.ActionEvent;
5
6 import javax.swing.AbstractAction;
7 import javax.swing.Action;
8
9 import org.telscenter.pas.beans.PasProject;
10 import org.telscenter.pas.beans.PasStep;
11 import org.telscenter.pas.ui.dialog.PasDialogManager;
12 import org.telscenter.pas.ui.dialog.PasShowReportsDialogUI;
13
14
15 public class WorkReportService implements IWorkReportService {
16
17 /***
18 * @author turadg
19 *
20 */
21 class NavigateAction extends AbstractAction {
22
23 private PasStep step;
24
25 /***
26 * @param step
27 */
28 public NavigateAction(PasStep step) {
29 this.step = step;
30 this.setEnabled(true);
31 this.putValue(Action.NAME, step.getTitle());
32 }
33
34 public void actionPerformed(ActionEvent e) {
35 navigationService.setCurrentStep(step);
36 }
37
38 }
39
40 private PasProject pasProject;
41 private INavigationService navigationService;
42
43 public WorkReportService(PasProject pasProject, INavigationService navigationService) {
44 super();
45 this.pasProject = pasProject;
46 this.navigationService = navigationService;
47 }
48
49
50 public Dialog popupShowAllWork() {
51 return doPopupEnhanced();
52 }
53
54
55
56 public Dialog doPopupEnhanced() {
57 PasShowReportsDialogUI ui = new PasShowReportsDialogUI(pasProject, navigationService);
58
59 return PasDialogManager.showPasMessageDialog("Show All Work", null, null, ui.createDialogPanel(), pasProject.getProjectFrame(), true, true, false, 0, 0);
60
61 }
62
63
64 }