]>
Commit | Line | Data |
---|---|---|
a13899c5 | 1 | /** @file\r |
2 | \r | |
3 | The file is used to create list item for CheckBox list\r | |
4 | \r | |
5 | Copyright (c) 2006, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;\r | |
16 | \r | |
17 | public class ICheckBoxListItem {\r | |
18 | \r | |
19 | //\r | |
20 | // Define Class Members\r | |
21 | //\r | |
22 | protected String text;\r | |
23 | \r | |
24 | protected boolean checked;\r | |
453a815b | 25 | \r |
26 | protected boolean selected;\r | |
a13899c5 | 27 | \r |
28 | /**\r | |
29 | This is the default constructor to set check box item string\r | |
30 | \r | |
31 | @param text\r | |
32 | \r | |
33 | **/\r | |
34 | public ICheckBoxListItem(String text) {\r | |
35 | this.text = text;\r | |
36 | }\r | |
37 | \r | |
38 | /**\r | |
39 | This is the override constructor to set check box item string and checked status\r | |
40 | \r | |
41 | @param text\r | |
42 | @param checked\r | |
43 | \r | |
44 | **/\r | |
45 | public ICheckBoxListItem(String text, boolean checked) {\r | |
46 | this.text = text;\r | |
47 | this.checked = checked;\r | |
48 | }\r | |
49 | \r | |
50 | /**\r | |
51 | set the checked status\r | |
52 | if true, set false\r | |
53 | if false, set true\r | |
54 | \r | |
55 | **/\r | |
56 | public void invertChecked() {\r | |
57 | checked = !checked;\r | |
58 | }\r | |
59 | \r | |
60 | public boolean isChecked() {\r | |
61 | return checked;\r | |
62 | }\r | |
63 | \r | |
64 | public void setChecked(boolean checked) {\r | |
65 | this.checked = checked;\r | |
66 | }\r | |
67 | \r | |
68 | public String getText() {\r | |
69 | return text;\r | |
70 | }\r | |
71 | \r | |
72 | public void setText(String text) {\r | |
73 | this.text = text;\r | |
74 | }\r | |
75 | \r | |
453a815b | 76 | public boolean isSelected() {\r |
77 | return selected;\r | |
78 | }\r | |
79 | \r | |
80 | public void setSelected(boolean selected) {\r | |
81 | this.selected = selected;\r | |
82 | }\r | |
83 | \r | |
a13899c5 | 84 | }\r |