KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > jsfext > event > EventObjectBase


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.jsfext.event;
24
25 import java.util.EventObject JavaDoc;
26
27 import javax.faces.component.UIComponent;
28
29
30 /**
31  * <p> This class serves as the base class for <code>EventObject</code>s in
32  * this package.</p>
33  *
34  * @author Ken Paulsen (ken.paulsen@sun.com)
35  */

36 public class EventObjectBase extends EventObject JavaDoc implements UIComponentHolder {
37
38     /**
39      * <p> This constructor should not be used.</p>
40      */

41     private EventObjectBase() {
42     super(null);
43     }
44
45     /**
46      * <p> This constructor is protected to avoid direct instantiation, one
47      * of the sub-classes of this class should be used instead.</p>
48      *
49      * @param component The <code>UIComponent</code> associated with this
50      * <code>EventObject</code>.
51      */

52     protected EventObjectBase(UIComponent component) {
53     super(component);
54     }
55
56     /**
57      * <P> This method returns the <code>UIComponent</code> held by the
58      * <code>Object</code> implementing this interface.</p>
59      *
60      * @return The <code>UIComponent</code>.
61      */

62     public UIComponent getUIComponent() {
63     return (UIComponent) getSource();
64     }
65 }
66
Popular Tags