View Javadoc

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