| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| GridPagerPosition |
|
| 0.0;0 |
| 1 | // Copyright 2007 The Apache Software Foundation | |
| 2 | // | |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 | // you may not use this file except in compliance with the License. | |
| 5 | // You may obtain a copy of the License at | |
| 6 | // | |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 | // | |
| 9 | // 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.tapestry5.corelib.data; | |
| 16 | ||
| 17 | import org.apache.tapestry5.corelib.components.Grid; | |
| 18 | ||
| 19 | /** | |
| 20 | * Used by the {@link Grid} component to control where the pager portion of the Grid should be displayed. | |
| 21 | */ | |
| 22 | 4 | public enum GridPagerPosition |
| 23 | { | |
| 24 | /** | |
| 25 | * Position the pager above the Grid's table. | |
| 26 | */ | |
| 27 | 2 | TOP(true, false), |
| 28 | ||
| 29 | /** | |
| 30 | * Position the pager below the Grid's table (this is the default). | |
| 31 | */ | |
| 32 | 2 | BOTTOM(false, true), |
| 33 | ||
| 34 | /** | |
| 35 | * Show the pager above and below the Grid's table. | |
| 36 | */ | |
| 37 | 2 | BOTH(true, true), |
| 38 | ||
| 39 | /** | |
| 40 | * Don't show a pager (the application will need to supply its own navigation mechanism). | |
| 41 | */ | |
| 42 | 2 | NONE(false, false); |
| 43 | ||
| 44 | private final boolean matchTop; | |
| 45 | ||
| 46 | private final boolean matchBottom; | |
| 47 | ||
| 48 | private GridPagerPosition(boolean matchTop, boolean matchBottom) | |
| 49 | 8 | { |
| 50 | 8 | this.matchTop = matchTop; |
| 51 | 8 | this.matchBottom = matchBottom; |
| 52 | 8 | } |
| 53 | ||
| 54 | public boolean isMatchBottom() | |
| 55 | { | |
| 56 | 102 | return matchBottom; |
| 57 | } | |
| 58 | ||
| 59 | public boolean isMatchTop() | |
| 60 | { | |
| 61 | 102 | return matchTop; |
| 62 | } | |
| 63 | ||
| 64 | } |