diff options
author | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
---|---|---|
committer | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-31 16:26:40 +0000 |
commit | 808def96aa4589fba9c2d0ea55837754a3b7a4f7 (patch) | |
tree | 0ea221c59abb2474c694e7ab5bd61006be77e47e /Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java | |
parent | 9216450d1143056a50a5f916984a2d7faf590488 (diff) | |
download | edk2-platforms-808def96aa4589fba9c2d0ea55837754a3b7a4f7.tar.xz |
Retiring the ANT/JAVA build and removing the older EDK II packages that required ANT/JAVA.
Last Ant/Java build was r7166
Developers requiring the Java/Ant packages should checkout the branch from:
https://edk2.tianocore.org/svn/edk2/branches/AntJava
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7168 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java')
-rw-r--r-- | Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java | 203 |
1 files changed, 0 insertions, 203 deletions
diff --git a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java b/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java deleted file mode 100644 index 6fbdf03ddd..0000000000 --- a/Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/iCheckBoxList/ICheckBoxList.java +++ /dev/null @@ -1,203 +0,0 @@ -/** @file
-
- The file is used to override JList to create a List with CheckBox item
-
- Copyright (c) 2006, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- **/
-package org.tianocore.frameworkwizard.common.ui.iCheckBoxList;
-
-import java.util.Vector;
-
-import javax.swing.JList;
-
-public class ICheckBoxList extends JList {
- ///
- /// Define class Serial Version UID
- ///
- private static final long serialVersionUID = -2843059688070447632L;
-
- protected ICheckBoxListCellRenderer cellrenderer = new ICheckBoxListCellRenderer();
-
- protected ICheckBoxListener listener = new ICheckBoxListener(this);
-
- protected ICheckBoxListModel model = new ICheckBoxListModel();
-
- /**
- This the default Constructor
-
- **/
- public ICheckBoxList() {
- this(null);
- }
-
- /**
- This the override constructor to create checkbox item with input vector
-
- @param options
-
- **/
- public ICheckBoxList(Vector<ICheckBoxListItem> items) {
- if (items != null) {
- for (int index = 0; index < items.size(); index++) {
- model.addElement(items.elementAt(index));
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
- this.setCellRenderer(cellrenderer);
- this.setModel(model);
- this.addMouseListener(listener);
- this.addKeyListener(listener);
- }
-
- /**
- Set all items of the CheckBoxList component.
-
- @param items
-
- **/
- public void setAllItems(Vector<String> items) {
- if (items != null) {
- model.removeAllElements();
- for (int index = 0; index < items.size(); index++) {
- model.addElement(new ICheckBoxListItem(items.elementAt(index)));
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
- }
-
- /**
- Get All Checked Items of the CheckBoxList component.
-
- @return All Checked Items
- **/
- public Vector<ICheckBoxListItem> getAllCheckedItems() {
- Vector<ICheckBoxListItem> result = new Vector<ICheckBoxListItem>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement((ICheckBoxListItem) this.getModel().getElementAt(i));
- }
- }
- return result;
- }
-
- /**
- Get All Checked Items index of the CheckBoxList component.
-
- @return All Checked Items index
- **/
- public Vector<Integer> getAllCheckedItemsIndex() {
- Vector<Integer> result = new Vector<Integer>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement(i);
- }
- }
- return result;
- }
-
- /**
- Get All Checked Items String of the CheckBoxList component.
-
- @return Vector
- **/
- public Vector<String> getAllCheckedItemsString() {
- Vector<String> result = new Vector<String>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- if (((ICheckBoxListItem) this.getModel().getElementAt(i)).isChecked()) {
- result.addElement(((ICheckBoxListItem) this.getModel().getElementAt(i)).text);
- }
- }
- return result;
- }
-
- /**
- Get All Items String of the CheckBoxList component.
-
- @return Vector
- **/
- public Vector<String> getAllItemsString() {
- Vector<String> result = new Vector<String>();
-
- for (int i = 0; i < this.getModel().getSize(); i++) {
- result.addElement(((ICheckBoxListItem) this.getModel().getElementAt(i)).text);
- }
- return result;
- }
-
- /**
- Set Checked status for all input items.
-
- **/
- public void initCheckedItem(boolean bool, Vector<String> items) {
- if (items != null && items.size() != 0) {
- for (int indexI = 0; indexI < items.size(); indexI++) {
- for (int indexJ = 0; indexJ < model.size(); indexJ++) {
- if (items.elementAt(indexI).equals(model.getAllElements().elementAt(indexJ).getText())) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(indexJ);
- listItem.setChecked(bool);
- break;
- }
- }
- }
- }
-
- //
- // If there exists at least one item, set first item selected.
- //
- if (model.size() > 0) {
- ICheckBoxListItem listItem = (ICheckBoxListItem) model.get(0);
- listItem.setSelected(true);
- }
-
- this.validate();
- }
-
- /**
- Set all items of the compontent checked
-
- **/
- public void setAllItemsChecked() {
- initCheckedItem(true, this.getAllItemsString());
- }
-
- /**
- Set all items of the compontent unchecked
-
- **/
- public void setAllItemsUnchecked() {
- initCheckedItem(false, this.getAllItemsString());
- }
-
- /**
- Remove all items of list
-
- **/
- public void removeAllItem() {
- model.removeAllElements();
- }
-}
|