View Javadoc
1   /*
2    * Copyright 2008 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.ole.sys.document.web;
17  
18  import java.util.List;
19  
20  import org.kuali.rice.kns.web.ui.Field;
21  
22  /**
23   * Base class for header labels
24   */
25  public abstract class HeaderLabel implements RenderableElement {
26      private boolean labeledFieldEmptyOrHidden = false;
27      
28      /**
29       * Header labels are never action blocks
30       * @see org.kuali.ole.sys.document.web.RenderableElement#isActionBlock()
31       */
32      public boolean isActionBlock() {
33          return false;
34      }
35  
36      /**
37       * Header labels are never hidden
38       * @see org.kuali.ole.sys.document.web.RenderableElement#isHidden()
39       */
40      public boolean isHidden() {
41          return false;
42      }
43  
44      /**
45       * Returns whether the label field is either hidden or empty; this way, any labels for
46       * moved hidden fields will be removed
47       * @see org.kuali.ole.sys.document.web.RenderableElement#isEmpty()
48       */
49      public boolean isEmpty() {
50          return labeledFieldEmptyOrHidden;
51      }
52      
53      /**
54       * Gets the labeledFieldEmptyOrHidden attribute. 
55       * @return Returns the labeledFieldEmptyOrHidden.
56       */
57      public boolean isLabeledFieldEmptyOrHidden() {
58          return labeledFieldEmptyOrHidden;
59      }
60  
61      /**
62       * Sets the labeledFieldEmptyOrHidden attribute value.
63       * @param labeledFieldEmptyOrHidden The labeledFieldEmptyOrHidden to set.
64       */
65      public void setLabeledFieldEmptyOrHidden(boolean labeledFieldEmptyOrHidden) {
66          this.labeledFieldEmptyOrHidden = labeledFieldEmptyOrHidden;
67      }
68  
69      /**
70       * Header labels aren't really fields, so they append nothing
71       * @see org.kuali.ole.sys.document.web.RenderableElement#appendFieldNames(java.util.List)
72       * 
73       * KRAD Conversion: Customization of the fields - No use of data dictionary
74       */
75      public void appendFields(List<Field> fields) {
76          // zzzz! zzzz!
77      }
78      
79      /**
80       * Does nothing
81       * @see org.kuali.ole.sys.document.web.RenderableElement#populateWithTabIndexIfRequested(int[], int)
82       */
83      public void populateWithTabIndexIfRequested(int reallyHighIndex) {}
84  }