01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/jsf/widgets/src/java/org/theospi/jsf/component/XHeaderComponent.java $
03: * $Id: XHeaderComponent.java 10835 2006-06-17 03:25:03Z lance@indiana.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.theospi.jsf.component;
21:
22: import java.util.Iterator;
23:
24: import javax.faces.component.UIComponent;
25: import javax.faces.component.UIOutput;
26:
27: public class XHeaderComponent extends UIOutput {
28:
29: /**
30: * Constructor-
31: * Indicates the component that this class is linked to
32: *
33: */
34: public XHeaderComponent() {
35: super ();
36: this .setRendererType("org.theospi.XHeader");
37: }
38:
39: /**
40: * pulls out the drawer component
41: *
42: */
43: public XHeaderDrawerComponent getDrawerComponent() {
44: for (Iterator iter = this .getChildren().iterator(); iter
45: .hasNext();) {
46: UIComponent child = (UIComponent) iter.next();
47:
48: if (child instanceof XHeaderDrawerComponent) {
49: return (XHeaderDrawerComponent) child;
50: }
51: }
52: return null;
53: }
54: }
|