01: // Copyright 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.corelib.data;
16:
17: import org.apache.tapestry.corelib.components.Grid;
18:
19: /**
20: * Used by the {@link Grid} component to control where the pager portion of the Grid should be
21: * displayed.
22: */
23: public enum GridPagerPosition {
24: /** Position the pager above the Grid's table. */
25: TOP(true, false),
26:
27: /** Position the pager below the Grid's table (this is the default). */
28: BOTTOM(false, true),
29:
30: /** Show the pager above and below the Grid's table. */
31: BOTH(true, true),
32:
33: /** Don't show a pager (the application will need to supply its own navigation mechanism). */
34: NONE(false, false);
35:
36: private final boolean _matchTop;
37:
38: private final boolean _matchBottom;
39:
40: private GridPagerPosition(boolean matchTop, boolean matchBottom) {
41: _matchTop = matchTop;
42: _matchBottom = matchBottom;
43: }
44:
45: public boolean isMatchBottom() {
46: return _matchBottom;
47: }
48:
49: public boolean isMatchTop() {
50: return _matchTop;
51: }
52:
53: }
|