KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > admingui > tree > FilterTreeEvent


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.admingui.tree;
24
25 import com.sun.enterprise.tools.jsfext.event.EventObjectBase;
26 import com.sun.enterprise.tools.jsfext.event.UIComponentHolder;
27
28 import java.util.EventObject JavaDoc;
29
30 import javax.faces.component.UIComponent;
31
32
33 /**
34  *
35  * @author Ken Paulsen (ken.paulsen@sun.com)
36  */

37 public class FilterTreeEvent extends EventObjectBase implements UIComponentHolder {
38
39     /**
40      * <p> Constructor.</p>
41      *
42      * @param component The <code>UIComponent</code> associated with this
43      * <code>EventObject</code>.
44      */

45     public FilterTreeEvent(UIComponent component, Object JavaDoc[] childObjects) {
46     super(component);
47         setChildObjects(childObjects);
48     }
49
50     /**
51      * <p> This method provides access to an array of Objects that are to
52      * become child <code>TreeNode</code>s. This allows you to manipluate
53      * them (filter them) before they are processed. You may return a new
54      * Object[] from your handler that processes this event. Note that
55      * you NOT set the child object array using this event.</p>
56      */

57     public Object JavaDoc[] getChildObjects() {
58         return _childObjects;
59     }
60     
61     /**
62      * <p> This method is protected because it is only meaningful to set this
63      * array during the creation of this event. Setting it any other
64      * time would not effect the original data structure and would serve
65      * no purpose. To provide a different object array, return a new
66      * <code>Object[]</code> from your handler that processes this
67      * event.</p>
68      */

69     protected void setChildObjects(Object JavaDoc[] objects) {
70         _childObjects = objects;
71     }
72
73     /**
74      * <p> The "filterTree" event type. ("filterTree")</p>
75      */

76     public static final String JavaDoc EVENT_TYPE = "filterTree";
77     
78     private Object JavaDoc[] _childObjects = null;
79 }
80
Popular Tags