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