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
6 import org.kuali.student.common.ui.client.mvc.DataModel;
7
8
9
10
11 public class ModelLoadedEvent extends GwtEvent<ModelLoadedEvent.Handler> {
12
13 public static Type<Handler> TYPE = new Type<Handler>();
14
15 private DataModel model;
16
17 public ModelLoadedEvent(DataModel model) {
18 this.model = model;
19 }
20
21
22 @Override
23 public Type<Handler> getAssociatedType() {
24 return TYPE;
25 }
26
27 @Override
28 protected void dispatch(Handler handler) {
29 handler.onEvent(this);
30 }
31
32 public DataModel getModel() {
33 return model;
34 }
35
36 public static interface Handler extends EventHandler {
37 void onEvent(ModelLoadedEvent event);
38 }
39 }