001    package org.kuali.student.lum.program.client.events;
002    
003    import com.google.gwt.event.shared.EventHandler;
004    import com.google.gwt.event.shared.GwtEvent;
005    
006    import org.kuali.student.common.ui.client.mvc.DataModel;
007    
008    /**
009     * @author Igor
010     */
011    public class ModelLoadedEvent extends GwtEvent<ModelLoadedEvent.Handler> {
012    
013        public static Type<Handler> TYPE = new Type<Handler>();
014    
015        private DataModel model;
016    
017        public ModelLoadedEvent(DataModel model) {
018            this.model = model;
019        }
020    
021    
022        @Override
023        public Type<Handler> getAssociatedType() {
024            return TYPE;
025        }
026    
027        @Override
028        protected void dispatch(Handler handler) {
029            handler.onEvent(this);
030        }
031    
032        public DataModel getModel() {
033            return model;
034        }
035    
036        public static interface Handler extends EventHandler {
037            void onEvent(ModelLoadedEvent event);
038        }
039    }