View Javadoc

1   /*
2    * Copyright 2004 Jeff Johnston
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *    http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.extremecomponents.table.cell;
17  
18  import org.extremecomponents.table.bean.Column;
19  import org.extremecomponents.table.model.TableModel;
20  
21  
22  
23  /***
24   * All table cells need to implement the Cell interface.
25   * You will be given the model and column, as well as the current row that the
26   * cell is on. When it is time to be displayed each cell will be
27   * asked for its HTML to display.
28   *
29   * @author Jeff Johnston
30   */
31  public interface Cell
32  {
33  	/***
34  	 * Pass all the model, column and rowcount where applicable.
35  	 */
36  	public void init(TableModel model, Column column, Integer rowcount);
37  
38  	/***
39  	 * just in case we need to clean up something before the next cell 
40  	 */
41  	public void destroy();
42  	
43  	/***
44  	 * The html that will be displayed in the table.
45  	 */
46  	public String html();
47  
48  	/***
49  	 * The simple value of the cell.
50  	 */
51  	public String value();
52  }