View Javadoc

1   /*
2    * @(#)$Id: AlgorithmList.java 691 2009-07-23 22:21:31Z kurmannu $
3    *
4    * Author   : Ueli Kurmann, igesture@uelikurmann.ch
5    *                                   
6    *                                   
7    * Purpose  : 
8    *
9    * -----------------------------------------------------------------------
10   *
11   * Revision Information:
12   *
13   * Date       Who     Reason
14   *
15   * 23.03.2008 ukurmann  Initial Release
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  package org.ximtec.igesture.tool.view.testbench.wrapper;
27  
28  import java.util.ArrayList;
29  import java.util.List;
30  
31  import org.ximtec.igesture.core.DefaultPropertyChangeNotifier;
32  import org.ximtec.igesture.tool.view.MainModel;
33  
34  public class AlgorithmList extends DefaultPropertyChangeNotifier {
35  
36    public static final String PROPERTY_SETS = "algorithms";
37  
38    public List<AlgorithmWrapper> algorithms;
39  
40    public AlgorithmList(MainModel mainModel) {
41      algorithms = new ArrayList<AlgorithmWrapper>();
42    }
43  
44    public void addAlgorithm(AlgorithmWrapper algorithmWrapper) {
45      algorithms.add(algorithmWrapper);
46      propertyChangeSupport.fireIndexedPropertyChange(PROPERTY_SETS, 0, null, algorithmWrapper);
47    }
48  
49    public List<AlgorithmWrapper> getAlgorithms() {
50      return algorithms;
51    }
52  
53    public String getName() {
54      // FIXME constant
55      return "Algorithm List";
56    }
57  
58    @Override
59    public String toString() {
60      return getName();
61    }
62  }