1 /**
2 * Copyright 2005-2012 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 import org.kuali.rice.krad.uif.component.Component;
19 import org.kuali.rice.krad.uif.element.Label;
20
21 import java.util.List;
22
23 /**
24 * Component that contains one or more user interface elements and can be placed
25 * into a <code>Container</code>
26 *
27 * <p>
28 * Provides a wrapper for various user interface elements so they can be treated
29 * uniformly by a container and rendered using a <code>LayoutManager</code>.
30 * Implementations exist for various types of elements and properties to
31 * configure that element.
32 * </p>
33 *
34 * @author Kuali Rice Team (rice.collab@kuali.org)
35 */
36 public interface Field extends Component {
37
38 /**
39 * Label text for the field
40 *
41 * <p>
42 * The label is generally used to identify the field in the user interface
43 * </p>
44 *
45 * @return String label text
46 */
47 public String getLabel();
48
49 /**
50 * Setter for the field's label text
51 *
52 * @param labelText
53 */
54 public void setLabel(String labelText);
55
56 /**
57 * Short label for the field
58 *
59 * <p>
60 * For areas of the user interface that have limited area (such as table
61 * headers), the short label can be used to identify the field
62 * </p>
63 *
64 * @return String short label
65 */
66 public String getShortLabel();
67
68 /**
69 * Setter for the field's short label text
70 *
71 * @param shortLabel
72 */
73 public void setShortLabel(String shortLabel);
74
75 /**
76 * <code>Label</code> instance for the field
77 *
78 * <p>
79 * The label field contains the labeling text for the field in addition to
80 * configuration for rendering in the user interface (such as the styling
81 * for the label area)
82 * </p>
83 *
84 * @return Label instance
85 */
86 public Label getFieldLabel();
87
88 /**
89 * Setter for the field's label field
90 *
91 * @param label
92 */
93 public void setFieldLabel(Label label);
94
95 /**
96 * Indicates whether the contained <code>Label</code> has been rendered
97 * as part of another field and thus should not be rendered with the
98 * attribute
99 *
100 * @return boolean true if the label field has been rendered, false if it
101 * should be rendered with the attribute
102 */
103 public boolean isLabelRendered();
104
105 /**
106 * Setter for the label field rendered indicator
107 *
108 * @param labelFieldRendered
109 */
110 public void setLabelRendered(boolean labelFieldRendered);
111
112 /**
113 * Label style classes for the field
114 *
115 * @return List<String> label style classes
116 */
117 public List<String> getLabelStyleClasses();
118
119 /**
120 * Setter for the field's label style classes
121 *
122 * @param labelStyleClasses
123 */
124 public void setLabelStyleClasses(List<String> labelStyleClasses);
125
126 /**
127 * Label column span for the field
128 *
129 * @return int label column span
130 */
131 public int getLabelColSpan();
132
133 /**
134 * Setter for the field's label column span
135 *
136 * @param labelColSpan
137 */
138 public void setLabelColSpan(int labelColSpan);
139
140 }