Coverage Report - javax.faces.event.FacesEvent
 
Classes in this File Line Coverage Branch Coverage Complexity
FacesEvent
91%
10/11
50%
1/2
1.286
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.event;
 17  
 
 18  
 import java.util.EventObject;
 19  
 
 20  
 import javax.faces.component.UIComponent;
 21  
 
 22  
 /**
 23  
  * @author shot
 24  
  */
 25  
 public abstract class FacesEvent extends EventObject {
 26  
 
 27  
     protected PhaseId phaseId;
 28  
 
 29  
     public FacesEvent(UIComponent component) {
 30  227
         super(component);
 31  224
         if (component == null) {
 32  0
             throw new IllegalArgumentException("FacesEvent");
 33  
         }
 34  224
         phaseId = PhaseId.ANY_PHASE;
 35  224
     }
 36  
 
 37  
     public UIComponent getComponent() {
 38  19
         return (UIComponent) getSource();
 39  
     }
 40  
 
 41  
     public PhaseId getPhaseId() {
 42  34
         return phaseId;
 43  
     }
 44  
 
 45  
     public void setPhaseId(PhaseId phaseId) {
 46  33
         this.phaseId = phaseId;
 47  33
     }
 48  
 
 49  
     public abstract boolean isAppropriateListener(FacesListener listener);
 50  
 
 51  
     public abstract void processListener(FacesListener listener);
 52  
 
 53  
     public void queue() {
 54  1
         ((UIComponent) getSource()).queueEvent(this);
 55  1
     }
 56  
 
 57  
 }