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 import org.kuali.student.lum.program.client.ProgramStatus; 006 007 /** 008 * @author Igor 009 */ 010 public class StateChangeEvent extends GwtEvent<StateChangeEvent.Handler> { 011 012 public static Type<Handler> TYPE = new Type<Handler>(); 013 014 private ProgramStatus programStatus; 015 016 public StateChangeEvent(ProgramStatus programStatus) { 017 this.programStatus = programStatus; 018 } 019 020 public ProgramStatus getProgramStatus() { 021 return programStatus; 022 } 023 024 @Override 025 public Type<Handler> getAssociatedType() { 026 return TYPE; 027 } 028 029 @Override 030 protected void dispatch(Handler handler) { 031 handler.onEvent(this); 032 } 033 034 public static interface Handler extends EventHandler { 035 void onEvent(StateChangeEvent event); 036 } 037 }