| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| SelectControl |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 1.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/ecl1.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 | /** | |
| 19 | * Represents a HTML Select control. Provides preset options for the User to | |
| 20 | * choose from by a drop down | |
| 21 | * | |
| 22 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 23 | */ | |
| 24 | public class SelectControl extends MultiValueControlBase { | |
| 25 | private static final long serialVersionUID = 6443247954759096815L; | |
| 26 | ||
| 27 | private int size; | |
| 28 | private boolean multiple; | |
| 29 | ||
| 30 | 0 | public SelectControl() { |
| 31 | 0 | size = 1; |
| 32 | 0 | multiple = false; |
| 33 | 0 | } |
| 34 | ||
| 35 | /** | |
| 36 | * Horizontal size of the control. This determines how many options can be | |
| 37 | * seen without using the control scoll bar. Defaults to 1 | |
| 38 | * | |
| 39 | * @return int size | |
| 40 | */ | |
| 41 | public int getSize() { | |
| 42 | 0 | return this.size; |
| 43 | } | |
| 44 | ||
| 45 | public void setSize(int size) { | |
| 46 | 0 | this.size = size; |
| 47 | 0 | } |
| 48 | ||
| 49 | /** | |
| 50 | * Indicates whether multiple values can be selected. Defaults to false | |
| 51 | * <p> | |
| 52 | * If multiple is set to true, the underlying property must be of Array type | |
| 53 | * </p> | |
| 54 | * | |
| 55 | * @return boolean true if multiple values can be selected, false if only | |
| 56 | * one value can be selected | |
| 57 | */ | |
| 58 | public boolean isMultiple() { | |
| 59 | 0 | return this.multiple; |
| 60 | } | |
| 61 | ||
| 62 | public void setMultiple(boolean multiple) { | |
| 63 | 0 | this.multiple = multiple; |
| 64 | 0 | } |
| 65 | ||
| 66 | } |