01: /*
02: * $Id$
03: * $Revision$
04: * $Date$
05: *
06: * ==============================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
08: * use this file except in compliance with the License. You may obtain a copy of
09: * the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16: * License for the specific language governing permissions and limitations under
17: * the License.
18: */
19: package wicket.markup.html.navigation.paging;
20:
21: /**
22: * Components that implement this interface will be pageable, they should return
23: * the pagecount so that an object/component knows how many pages it can use for
24: * the setCurrentPage method.
25: *
26: * The PageableListView is one example that is Pageable. But also a Form could
27: * be pageable so that you can scroll to sets of records that you display in
28: * that form with any navigator you want.
29: *
30: * @author jcompagner
31: */
32: public interface IPageable {
33: /**
34: * @return The current page that is or will be rendered rendered.
35: */
36: int getCurrentPage();
37:
38: /**
39: * Sets the a page that should be rendered.
40: *
41: * @param page
42: * The page that should be rendered.
43: */
44: void setCurrentPage(int page);
45:
46: /**
47: * Gets the total number of pages this pageable object has.
48: *
49: * @return The total number of pages this pageable object has
50: */
51: int getPageCount();
52: }
|