KickJava   Java API By Example, From Geeks To Geeks.

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


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  *
32  * @author Ken Paulsen (ken.paulsen@sun.com)
33  */

34 public class CommandEvent extends EventObjectBase implements UIComponentHolder {
35
36     /**
37      * <p> Constructor.</p>
38      *
39      * @param component The <code>UIComponent</code> associated with this
40      * <code>EventObject</code>.
41      */

42     public CommandEvent(UIComponent component, EventObject JavaDoc actionEvent) {
43     super(component);
44     setActionEvent(actionEvent);
45     }
46
47     /**
48      * <p> Setter for <code>actionEvent</code>. When a
49      * <code>CommandEvent</code> is created, there is often another event
50      * involved. This property contains that other event (if any). The
51      * type of this event is often an <code>ActionEvent</code>, hence the
52      * name of this property. However, this should not always be assumed
53      * to be set or of type <code>ActionEvent</code>.</p>
54      *
55      * @param actionEvent The <code>EventObject</code> to set.
56      */

57     public void setActionEvent(EventObject JavaDoc actionEvent) {
58     _actionEvent = actionEvent;
59     }
60
61     /**
62      * <p> Getter for <code>actionEvent</code>. When a
63      * <code>CommandEvent</code> is created, there is often another event
64      * involved. This property contains that other event (if any). The
65      * type of this event is often an <code>ActionEvent</code>, hence the
66      * name of this property. However, this should not always be assumed
67      * to be set or of type <code>ActionEvent</code>.</p>
68      *
69      * @return The actionEvent <code>EventObject</code>.
70      */

71     public EventObject JavaDoc getActionEvent() {
72     return _actionEvent;
73     }
74
75     private EventObject JavaDoc _actionEvent = null;
76
77     /**
78      * <p> The "command" event type. ("command")</p>
79      */

80     public static final String JavaDoc EVENT_TYPE = "command";
81 }
82
Popular Tags