001 /** 002 * Copyright 2005-2011 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.krad.uif.field; 017 018 import org.kuali.rice.krad.uif.component.Component; 019 020 /** 021 * Component that contains one or more user interface elements and can be placed 022 * into a <code>Container</code> 023 * 024 * <p> 025 * Provides a wrapper for various user interface elements so they can be treated 026 * uniformly by a container and rendered using a <code>LayoutManager</code>. 027 * Implementations exist for various types of elements and properties to 028 * configure that element. 029 * </p> 030 * 031 * @author Kuali Rice Team (rice.collab@kuali.org) 032 */ 033 public interface Field extends Component { 034 035 /** 036 * Label text for the field 037 * 038 * <p> 039 * The label is generally used to identify the field in the user interface 040 * </p> 041 * 042 * @return String label text 043 */ 044 public String getLabel(); 045 046 /** 047 * Setter for the field's label text 048 * 049 * @param label 050 */ 051 public void setLabel(String label); 052 053 /** 054 * Short label for the field 055 * 056 * <p> 057 * For areas of the user interface that have limited area (such as table 058 * headers), the short label can be used to identify the field 059 * </p> 060 * 061 * @return String short label 062 */ 063 public String getShortLabel(); 064 065 /** 066 * Setter for the field's short label text 067 * 068 * @param shortLabel 069 */ 070 public void setShortLabel(String shortLabel); 071 072 /** 073 * <code>LabelField</code> instance for the field 074 * 075 * <p> 076 * The label field contains the labeling text for the field in addition to 077 * configuration for rendering in the user interface (such as the styling 078 * for the label area) 079 * </p> 080 * 081 * @return LabelField instance 082 */ 083 public LabelField getLabelField(); 084 085 /** 086 * Setter for the field's label field 087 * 088 * @param labelField 089 */ 090 public void setLabelField(LabelField labelField); 091 092 /** 093 * Indicates whether the contained <code>LabelField</code> has been rendered 094 * as part of another field and thus should not be rendered with the 095 * attribute 096 * 097 * @return boolean true if the label field has been rendered, false if it 098 * should be rendered with the attribute 099 */ 100 public boolean isLabelFieldRendered(); 101 102 /** 103 * Setter for the label field rendered indicator 104 * 105 * @param labelFieldRendered 106 */ 107 public void setLabelFieldRendered(boolean labelFieldRendered); 108 109 }