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.bean;
17  
18  import org.apache.commons.logging.Log;
19  import org.apache.commons.logging.LogFactory;
20  
21  
22  /***
23   * Represents the section of the table that will be displayed.
24   *
25   * @author Jeff Johnston
26   */
27  public class TableSection
28  {
29  	private static Log logger = LogFactory.getLog(TableSection.class);
30  
31  	/***
32  	 * The current page that will be displayed.
33  	 */
34  	private int page;
35  
36  	/***
37  	 * The first row that will be displayed.
38  	 */
39  	private int rowStart;
40  
41  	/***
42  	 * The last row that will be displayed.
43  	 */
44  	private int rowEnd;
45  
46  	/***
47  	 * The totals rows that are in the Collection, not
48  	 * the rows just being displayed.
49  	 */
50  	private int totalRows;
51  
52  	public TableSection(int page, int rowStart, int rowEnd, int totalRows)
53  	{
54  		this.page = page;
55  		this.rowStart = rowStart;
56  		this.rowEnd = rowEnd;
57  		this.totalRows = totalRows;
58  	}
59  
60  	public int getPage()
61  	{
62  		return page;
63  	}
64  
65  	public int getRowStart()
66  	{
67  		return rowStart;
68  	}
69  
70  	public int getRowEnd()
71  	{
72  		return rowEnd;
73  	}
74  
75  	public int getTotalRows()
76  	{
77  		return totalRows;
78  	}
79  }