1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
55 return "Algorithm List";
56 }
57
58 @Override
59 public String toString() {
60 return getName();
61 }
62 }