]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxListModel.java
3 The file is used to override DefaultListModel to create ICheckBoxListModel
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
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.
15 package org
.tianocore
.frameworkwizard
.common
.ui
.iCheckBoxList
;
18 import java
.util
.Vector
;
20 public class ICheckBoxListModel
extends DefaultListModel
{
22 /// Define class Serial Version UID
24 private static final long serialVersionUID
= -8617800969723991017L;
27 This is the default Constructor for the CheckBoxListModel object
30 public ICheckBoxListModel() {
34 override DefaultListModel's add method
40 public void add(int index
, ICheckBoxListItem item
) {
41 super.add(index
, item
);
50 public void addElement(ICheckBoxListItem item
) {
51 super.addElement(item
);
55 Get all elements of the list
58 public Vector
<ICheckBoxListItem
> getAllElements() {
59 Vector
<ICheckBoxListItem
> items
= new Vector
<ICheckBoxListItem
>();
60 ICheckBoxListItem
[] objs
= new ICheckBoxListItem
[this.size()];
62 for (int i
= 0; i
< size(); i
++) {
63 items
.addElement(objs
[i
]);