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