| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| ControlBase |
|
| 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.control; | |
| 17 | ||
| 18 | import org.kuali.rice.krad.uif.component.ComponentBase; | |
| 19 | ||
| 20 | /** | |
| 21 | * Base class for all <code>Control</code> implementations | |
| 22 | * | |
| 23 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 24 | * | |
| 25 | * @see org.kuali.rice.krad.uif.control.Control | |
| 26 | */ | |
| 27 | public abstract class ControlBase extends ComponentBase implements Control { | |
| 28 | private static final long serialVersionUID = -7898244978136312663L; | |
| 29 | ||
| 30 | private int tabIndex; | |
| 31 | ||
| 32 | private boolean disabled; | |
| 33 | private String disabledReason; | |
| 34 | ||
| 35 | public ControlBase() { | |
| 36 | 0 | super(); |
| 37 | ||
| 38 | 0 | disabled = false; |
| 39 | 0 | } |
| 40 | ||
| 41 | /** | |
| 42 | * @see org.kuali.rice.krad.uif.component.Component#getComponentTypeName() | |
| 43 | */ | |
| 44 | @Override | |
| 45 | public final String getComponentTypeName() { | |
| 46 | 0 | return "control"; |
| 47 | } | |
| 48 | ||
| 49 | /** | |
| 50 | * @see Control#getTabIndex() | |
| 51 | */ | |
| 52 | public int getTabIndex() { | |
| 53 | 0 | return this.tabIndex; |
| 54 | } | |
| 55 | ||
| 56 | /** | |
| 57 | * @see Control#setTabIndex(int) | |
| 58 | */ | |
| 59 | public void setTabIndex(int tabIndex) { | |
| 60 | 0 | this.tabIndex = tabIndex; |
| 61 | 0 | } |
| 62 | ||
| 63 | /** | |
| 64 | * @see Control#isDisabled() | |
| 65 | */ | |
| 66 | public boolean isDisabled() { | |
| 67 | 0 | return disabled; |
| 68 | } | |
| 69 | ||
| 70 | /** | |
| 71 | * @see Control#setDisabled(boolean) | |
| 72 | */ | |
| 73 | public void setDisabled(boolean disabled) { | |
| 74 | 0 | this.disabled = disabled; |
| 75 | 0 | } |
| 76 | ||
| 77 | /** | |
| 78 | * @see Control#getDisabledReason() | |
| 79 | */ | |
| 80 | public String getDisabledReason() { | |
| 81 | 0 | return disabledReason; |
| 82 | } | |
| 83 | ||
| 84 | /** | |
| 85 | * @see Control#setDisabledReason(java.lang.String) | |
| 86 | */ | |
| 87 | public void setDisabledReason(String disabledReason) { | |
| 88 | 0 | this.disabledReason = disabledReason; |
| 89 | 0 | } |
| 90 | ||
| 91 | @Override | |
| 92 | public boolean getSupportsOnChange() { | |
| 93 | 0 | return true; |
| 94 | } | |
| 95 | ||
| 96 | @Override | |
| 97 | public boolean getSupportsOnBlur() { | |
| 98 | 0 | return true; |
| 99 | } | |
| 100 | ||
| 101 | @Override | |
| 102 | public boolean getSupportsOnClick() { | |
| 103 | 0 | return true; |
| 104 | } | |
| 105 | ||
| 106 | @Override | |
| 107 | public boolean getSupportsOnDblClick() { | |
| 108 | 0 | return true; |
| 109 | } | |
| 110 | ||
| 111 | @Override | |
| 112 | public boolean getSupportsOnFocus() { | |
| 113 | 0 | return true; |
| 114 | } | |
| 115 | } |