KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jmanage > util > display > AbstractTable


1 /**
2 * Copyright (c) 2004-2005 jManage.org
3 *
4 * This is a free software; you can redistribute it and/or
5 * modify it under the terms of the license at
6 * http://www.jmanage.org.
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */

14 package org.jmanage.util.display;
15
16 import java.util.List JavaDoc;
17 import java.util.LinkedList JavaDoc;
18
19 /**
20  *
21  * <p>
22  * Date: Sep 29, 2005
23  * @author Rakesh Kalra
24  */

25 public abstract class AbstractTable implements Table {
26
27     private String JavaDoc[] header;
28     private List JavaDoc rows = new LinkedList JavaDoc();
29
30     public void setHeader(String JavaDoc[] header) {
31         this.header = header;
32     }
33
34     public void addRow(String JavaDoc[] row) {
35         rows.add(row);
36     }
37
38     public void addRows(List JavaDoc rows) {
39         this.rows.addAll(rows);
40     }
41
42     protected String JavaDoc[] getHeader(){
43         return header;
44     }
45
46     protected List JavaDoc getRows(){
47         return rows;
48     }
49 }
50
Popular Tags