Coverage Report - org.kuali.student.lum.program.client.events.UpdateEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
UpdateEvent
0%
0/15
N/A
1
UpdateEvent$Handler
N/A
N/A
1
 
 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.Callback;
 6  
 import org.kuali.student.common.ui.client.mvc.Controller;
 7  
 
 8  
 /**
 9  
  * @author Igor
 10  
  */
 11  0
 public class UpdateEvent extends GwtEvent<UpdateEvent.Handler> {
 12  
 
 13  0
     public static Type<Handler> TYPE = new Type<Handler>();
 14  
 
 15  
     private Callback<Boolean> okCallback;
 16  
 
 17  
     private Enum<?> currentView;
 18  
 
 19  
     public UpdateEvent() {
 20  0
         this(Controller.NO_OP_CALLBACK);
 21  0
     }
 22  
 
 23  
     public UpdateEvent(Enum<?> currentView) {
 24  0
         this();
 25  0
         this.currentView = currentView;
 26  0
     }
 27  
 
 28  0
     public UpdateEvent(Callback<Boolean> okCallback) {
 29  0
         this.okCallback = okCallback;
 30  0
     }
 31  
 
 32  
     @Override
 33  
     public Type<Handler> getAssociatedType() {
 34  0
         return TYPE;
 35  
     }
 36  
 
 37  
     @Override
 38  
     protected void dispatch(Handler handler) {
 39  0
         handler.onEvent(this);
 40  0
     }
 41  
 
 42  
     public Callback<Boolean> getOkCallback() {
 43  0
         return okCallback;
 44  
     }
 45  
 
 46  
     public Enum<?> getCurrentView() {
 47  0
         return currentView;
 48  
     }
 49  
 
 50  
     public static interface Handler extends EventHandler {
 51  
         void onEvent(UpdateEvent event);
 52  
     }
 53  
 }