KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > faces > core > component > UIGrid


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.faces.core.component;
6
7 import java.util.ArrayList JavaDoc;
8 import java.util.List JavaDoc;
9 import javax.faces.context.FacesContext;
10 import javax.faces.render.Renderer;
11 import org.exoplatform.faces.core.component.model.Row;
12 import org.exoplatform.faces.core.component.model.Rows;
13 /**
14  * Wed, Dec 22, 2003 @ 23:14
15  * @author: Tuan Nguyen
16  * @email: tuan08@users.sourceforge.net
17  * @version: $Id: UIGrid.java,v 1.6 2004/08/07 18:11:24 tuan08 Exp $
18  */

19 public class UIGrid extends UIExoCommand {
20   public static final String JavaDoc COMPONENT_FAMILY = "org.exoplatform.faces.core.component.UIGrid" ;
21   private List JavaDoc rows_ ;
22
23   public UIGrid() {
24     rows_ = new ArrayList JavaDoc(10) ;
25     setRendererType("GridRenderer") ;
26   }
27
28   final public UIGrid setClazzAndreturn(String JavaDoc clazz) {
29     setClazz(clazz) ;
30     return this ;
31   }
32
33   final public List JavaDoc getRows() { return rows_ ; }
34
35   public void clear() {
36     getChildren().clear() ;
37     rows_.clear() ;
38   }
39
40   final public UIGrid add(Row row) {
41     rows_.add(row) ;
42     return this ;
43   }
44   
45   final public UIGrid add(Rows rows) {
46     rows_.add(rows) ;
47     return this ;
48   }
49   
50   public Renderer getComponentRenderer(FacesContext context) {
51     return getRenderer(context);
52   }
53   
54   public String JavaDoc getFamily() { return COMPONENT_FAMILY ; }
55 }
Popular Tags