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