1 16 17 package javax.faces.event; 18 19 import javax.faces.component.UIComponent; 20 import java.util.EventObject ; 21 import java.io.Serializable ; 22 23 27 public abstract class FacesEvent extends EventObject 28 implements Serializable 29 { 30 private PhaseId _phaseId; 32 33 public FacesEvent(UIComponent uiComponent) 35 { 36 super(uiComponent); 37 if (uiComponent == null) throw new IllegalArgumentException ("uiComponent"); 38 _phaseId = PhaseId.ANY_PHASE; 39 } 40 41 public abstract boolean isAppropriateListener(FacesListener faceslistener); 43 44 public abstract void processListener(FacesListener faceslistener); 45 46 public UIComponent getComponent() 47 { 48 return (UIComponent)getSource(); 49 } 50 51 public void queue() 52 { 53 ((UIComponent)getSource()).queueEvent(this); 54 } 55 56 public PhaseId getPhaseId() 57 { 58 return _phaseId; 59 } 60 61 public void setPhaseId(PhaseId phaseId) 62 { 63 _phaseId = phaseId; 64 } 65 } 66 | Popular Tags |