1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package de.desy.acop.displayers.tools;
24
25 import java.util.EventObject;
26
27 import de.desy.acop.displayers.AcopTrendChart;
28
29
30
31
32
33
34
35
36 public class AcopTrendChartEvent extends EventObject {
37
38 private static final long serialVersionUID = 1L;
39
40 public static final String TIMEOUT = "Timeout";
41 public static final String NO_DATA = "No data";
42
43 public static enum EventType {OPERATION_STARTED,MULTIPLE_OPERATION_STARTED,OPERATION_ENDED,MULTIPLE_OPERATION_ENDED,ERROR,PROGRESS}
44
45 private EventType type;
46 private String message;
47 private AcopGraphHistoryParameters currentElement;
48 private Throwable throwable;
49
50
51 public AcopTrendChartEvent(Object source) {
52 super(source);
53 }
54
55 public AcopTrendChartEvent(Object source, EventType type, String message) {
56 this(source, type, message, null, null);
57 }
58
59 public AcopTrendChartEvent(Object source, EventType type, String message, AcopGraphHistoryParameters currentElement) {
60 this(source, type, message, currentElement, null);
61 }
62
63 public AcopTrendChartEvent(Object source, EventType type, Throwable throwable) {
64 this(source, type, null, null, throwable);
65 }
66
67
68
69
70
71
72
73
74 public AcopTrendChartEvent(Object source, EventType type, String message, AcopGraphHistoryParameters currentElement, Throwable throwable) {
75 super(source);
76 this.type = type;
77 this.message = message;
78 this.currentElement = currentElement;
79 this.throwable = throwable;
80 }
81
82
83
84
85
86 public AcopGraphHistoryParameters getCurrentElement() {
87 return currentElement;
88 }
89
90
91
92
93
94 public String getMessage() {
95 return message;
96 }
97
98
99
100
101
102 public EventType getType() {
103 return type;
104 }
105
106
107
108
109 public Throwable getThrowable() {
110 return throwable;
111 }
112
113 }