1 | |
package org.kuali.student.lum.program.client.events; |
2 | |
|
3 | |
import com.google.gwt.event.shared.EventHandler; |
4 | |
import com.google.gwt.event.shared.GwtEvent; |
5 | |
import org.kuali.student.lum.program.client.ProgramStatus; |
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | 0 | public class StateChangeEvent extends GwtEvent<StateChangeEvent.Handler> { |
11 | |
|
12 | 0 | public static Type<Handler> TYPE = new Type<Handler>(); |
13 | |
|
14 | |
private ProgramStatus programStatus; |
15 | |
|
16 | 0 | public StateChangeEvent(ProgramStatus programStatus) { |
17 | 0 | this.programStatus = programStatus; |
18 | 0 | } |
19 | |
|
20 | |
public ProgramStatus getProgramStatus() { |
21 | 0 | return programStatus; |
22 | |
} |
23 | |
|
24 | |
@Override |
25 | |
public Type<Handler> getAssociatedType() { |
26 | 0 | return TYPE; |
27 | |
} |
28 | |
|
29 | |
@Override |
30 | |
protected void dispatch(Handler handler) { |
31 | 0 | handler.onEvent(this); |
32 | 0 | } |
33 | |
|
34 | |
public static interface Handler extends EventHandler { |
35 | |
void onEvent(StateChangeEvent event); |
36 | |
} |
37 | |
} |