Coverage Report - org.kuali.rice.krad.uif.control.Control
 
Classes in this File Line Coverage Branch Coverage Complexity
Control
N/A
N/A
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.control;
 17  
 
 18  
 import org.kuali.rice.krad.uif.component.Component;
 19  
 
 20  
 /**
 21  
  * Represents an interactive element in the UI (typically an HTML control)
 22  
  * <p>
 23  
  * Each control that can be rendered in the UIF should be an implement the
 24  
  * <code>Control</code> interface. The control is a regular component, thus has
 25  
  * a corresponding template that will render the control for the UI. Controls
 26  
  * provide the mechanism for gathering data from the User or for the User to
 27  
  * initiate an action. HTML controls must be rendered within a <code>Form</code>
 28  
  * element.
 29  
  * </p>
 30  
  *
 31  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 32  
  */
 33  
 public interface Control extends Component {
 34  
 
 35  
     /**
 36  
      * Unique index of the control within the tab order
 37  
      *
 38  
      * <p>
 39  
      * Tab index provides a way to set the order users will tab through the
 40  
      * controls. The control with index 1 will receive focus when the page is
 41  
      * rendered. Tabing from the field will then take the user to the control
 42  
      * with index 2, then index 3, and so on.
 43  
      * </p>
 44  
      *
 45  
      * @return int the tab index for the control
 46  
      */
 47  
     public int getTabIndex();
 48  
 
 49  
     /**
 50  
      * Setter for the controls tab order index
 51  
      *
 52  
      * @param tabIndex
 53  
      */
 54  
     public void setTabIndex(int tabIndex);
 55  
 
 56  
     /**
 57  
      * Indicates whether the control is disabled (doesn't allow input)
 58  
      *
 59  
      * @return boolean true if the control is disabled, false if not
 60  
      */
 61  
     public boolean isDisabled();
 62  
 
 63  
     /**
 64  
      * Setter for the disabled indicator
 65  
      *
 66  
      * @param disabled
 67  
      */
 68  
     public void setDisabled(boolean disabled);
 69  
 
 70  
     /**
 71  
      * If the control is disabled, gives a reason for why which will be displayed as a tooltip
 72  
      * on the control
 73  
      *
 74  
      * @return String disabled reason text
 75  
      * @see {@link #isDisabled()}
 76  
      */
 77  
     public String getDisabledReason();
 78  
 
 79  
     /**
 80  
      * Setter for the disabled reason text
 81  
      *
 82  
      * @param disabledReason
 83  
      */
 84  
     public void setDisabledReason(String disabledReason);
 85  
 }
 86  
 
 87