View Javadoc

1   /***
2    * Copyright (C) 2005 The Java Community
3    *
4    * This program is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU General Public License as published by the Free Software
6    * Foundation; either version 2 of the License, or (at your option) any later
7    * version.
8    *
9    * This program is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12   * details.
13   *
14   * You should have received a copy of the GNU General Public License along with
15   * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16   * Place, Suite 330, Boston, MA 02111-1307 USA.
17   *
18   */
19  package org.bejug.javacareers.project.properties;
20  
21  import java.util.ArrayList;
22  import java.util.Arrays;
23  import java.util.List;
24  
25  import org.bejug.javacareers.jobs.model.Item;
26  
27  /***
28   * This class holds the list of ItemValueBindings.
29   *
30   * @author : Peter Symoens (Last modified by $Author: shally $)
31   * @version $Revision: 1.7 $ - $Date: 2005/12/20 15:36:47 $:
32   */
33  public class ItemValueBindingList {
34  
35  
36      private List bindingList;
37  
38      /***
39       * 
40       */
41      private ItemValueBinding[] itemList;
42  
43      /***
44       *
45       * @param itemList The itemListto set.
46       */
47      public void setItemList(ItemValueBinding[] itemList){
48          this.itemList = itemList;
49      }
50  
51      /***
52       *
53       * @param item Item
54       */
55      public void add(Item item){
56            bindingList.add(item);
57      }
58  
59      /***
60       *
61       * @param item Item
62       */
63      public void remove(Item item) {
64          bindingList.remove(item);
65      }
66  
67  
68      /***
69       *
70       * @return the ValueBindingList
71       */
72      public List getBindingList() {
73          if(bindingList == null){
74              bindingList = new ArrayList(Arrays.asList(itemList));
75          }
76          return bindingList;
77      }
78  }
79  
80  /***
81   * $Log: ItemValueBindingList.java,v $
82   * Revision 1.7  2005/12/20 15:36:47  shally
83   * CheckStyle and PMD changes.
84   *
85   * Revision 1.6  2005/12/08 14:53:46  shally
86   * Opkuis voor checkstyle.
87   *
88   * Revision 1.5  2005/09/13 08:11:06  schauwvliege
89   * organize imports
90   *
91   * Revision 1.4  2005/08/30 13:51:17  psong09
92   * added javadoc
93   *
94   * Revision 1.3  2005/08/30 13:07:48  psong09
95   * renamed author: psong09
96   *
97   * Revision 1.2  2005/08/29 12:45:02  psong09
98   * moved spinner actionListener to ItemAction
99   *
100  * Revision 1.1  2005/08/24 12:32:13  psong09
101  * Added spinner component and renamed commentAction
102  *
103  */