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