| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| HeaderField |
|
| 1.0;1 |
| 1 | /** | |
| 2 | * Copyright 2005-2011 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php | |
| 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.kuali.rice.krad.uif.field; | |
| 17 | ||
| 18 | ||
| 19 | /** | |
| 20 | * Field that contains a header element and optionally a <code>Group</code> to | |
| 21 | * present along with the header text | |
| 22 | * | |
| 23 | * <p> | |
| 24 | * Generally the group is used to display content to the right of the header, | |
| 25 | * such as links for the group or other information | |
| 26 | * </p> | |
| 27 | * | |
| 28 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 29 | */ | |
| 30 | public class HeaderField extends FieldGroup { | |
| 31 | private static final long serialVersionUID = -6950408292923393244L; | |
| 32 | ||
| 33 | private String headerText; | |
| 34 | private String headerLevel; | |
| 35 | private String headerStyleClasses; | |
| 36 | private String headerStyle; | |
| 37 | private String headerDivStyleClasses; | |
| 38 | private String headerDivStyle; | |
| 39 | ||
| 40 | public HeaderField() { | |
| 41 | 0 | super(); |
| 42 | 0 | } |
| 43 | ||
| 44 | /** | |
| 45 | * Text that should be displayed on the header | |
| 46 | * | |
| 47 | * @return String header text | |
| 48 | */ | |
| 49 | public String getHeaderText() { | |
| 50 | 0 | return this.headerText; |
| 51 | } | |
| 52 | ||
| 53 | /** | |
| 54 | * Setter for the header text | |
| 55 | * | |
| 56 | * @param headerText | |
| 57 | */ | |
| 58 | public void setHeaderText(String headerText) { | |
| 59 | 0 | this.headerText = headerText; |
| 60 | 0 | } |
| 61 | ||
| 62 | /** | |
| 63 | * HTML header level (h1 ... h6) that should be applied to the header text | |
| 64 | * | |
| 65 | * @return String header level | |
| 66 | */ | |
| 67 | public String getHeaderLevel() { | |
| 68 | 0 | return this.headerLevel; |
| 69 | } | |
| 70 | ||
| 71 | /** | |
| 72 | * Setter for the header level | |
| 73 | * | |
| 74 | * @param headerLevel | |
| 75 | */ | |
| 76 | public void setHeaderLevel(String headerLevel) { | |
| 77 | 0 | this.headerLevel = headerLevel; |
| 78 | 0 | } |
| 79 | ||
| 80 | /** | |
| 81 | * Style class that should be applied to the header text (h tag) | |
| 82 | * | |
| 83 | * <p> | |
| 84 | * Note the style class given here applies to only the header text. The | |
| 85 | * style class property inherited from the <code>Component</code> interface | |
| 86 | * can be used to set the class for the whole field div (which could | |
| 87 | * include a nested <code>Group</code>) | |
| 88 | * </p> | |
| 89 | * | |
| 90 | * @return String style class | |
| 91 | * @see org.kuali.rice.krad.uif.Component.getStyleClasses() | |
| 92 | */ | |
| 93 | public String getHeaderStyleClasses() { | |
| 94 | 0 | return this.headerStyleClasses; |
| 95 | } | |
| 96 | ||
| 97 | /** | |
| 98 | * Setter for the header style class | |
| 99 | * | |
| 100 | * @param headerStyleClasses | |
| 101 | */ | |
| 102 | public void setHeaderStyleClasses(String headerStyleClasses) { | |
| 103 | 0 | this.headerStyleClasses = headerStyleClasses; |
| 104 | 0 | } |
| 105 | ||
| 106 | /** | |
| 107 | * Style that should be applied to the header text | |
| 108 | * | |
| 109 | * <p> | |
| 110 | * Note the style given here applies to only the header text. The style | |
| 111 | * property inherited from the <code>Component</code> interface can be used | |
| 112 | * to set the style for the whole field div (which could include a nested | |
| 113 | * <code>Group</code>) | |
| 114 | * </p> | |
| 115 | * | |
| 116 | * @return String header style | |
| 117 | * @see org.kuali.rice.krad.uif.Component.getStyle() | |
| 118 | */ | |
| 119 | public String getHeaderStyle() { | |
| 120 | 0 | return this.headerStyle; |
| 121 | } | |
| 122 | ||
| 123 | /** | |
| 124 | * Setter for the header style | |
| 125 | * | |
| 126 | * @param headerStyle | |
| 127 | */ | |
| 128 | public void setHeaderStyle(String headerStyle) { | |
| 129 | 0 | this.headerStyle = headerStyle; |
| 130 | 0 | } |
| 131 | ||
| 132 | /** | |
| 133 | * Style class that should be applied to the header div | |
| 134 | * | |
| 135 | * <p> | |
| 136 | * Note the style class given here applies to the div surrounding the header tag only | |
| 137 | * </p> | |
| 138 | * | |
| 139 | * @return String style class | |
| 140 | * @see org.kuali.rice.krad.uif.Component.getStyleClasses() | |
| 141 | */ | |
| 142 | public String getHeaderDivStyleClasses() { | |
| 143 | 0 | return headerDivStyleClasses; |
| 144 | } | |
| 145 | ||
| 146 | /** | |
| 147 | * Setter for the header div class | |
| 148 | * | |
| 149 | * @param headerStyleClasses | |
| 150 | */ | |
| 151 | public void setHeaderDivStyleClasses(String headerDivStyleClasses) { | |
| 152 | 0 | this.headerDivStyleClasses = headerDivStyleClasses; |
| 153 | 0 | } |
| 154 | ||
| 155 | /** | |
| 156 | * Style that should be applied to the header div | |
| 157 | * | |
| 158 | * <p> | |
| 159 | * Note the style given here applies to the div surrounding the header tag only | |
| 160 | * </p> | |
| 161 | * | |
| 162 | * @return String header style | |
| 163 | * @see org.kuali.rice.krad.uif.Component.getStyle() | |
| 164 | */ | |
| 165 | public String getHeaderDivStyle() { | |
| 166 | 0 | return headerDivStyle; |
| 167 | } | |
| 168 | ||
| 169 | /** | |
| 170 | * Setter for the header div | |
| 171 | * | |
| 172 | * @param headerStyle | |
| 173 | */ | |
| 174 | public void setHeaderDivStyle(String headerDivStyle) { | |
| 175 | 0 | this.headerDivStyle = headerDivStyle; |
| 176 | 0 | } |
| 177 | } |