-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathParameterGroup.java
More file actions
45 lines (33 loc) · 1018 Bytes
/
ParameterGroup.java
File metadata and controls
45 lines (33 loc) · 1018 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package nodebox.node;
import java.util.ArrayList;
import java.util.List;
public class ParameterGroup {
private Node node;
private String label;
private List<Parameter> parameters = new ArrayList<Parameter>();
public ParameterGroup(Node node, String label) {
this.node = node;
this.label = label;
}
public void setNode(Node node) {
this.node = node;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
node.getLibrary().fireNodeAttributeChanged(node, Node.Attribute.PARAMETER);
}
//// Container operations ////
public boolean addParameter(Parameter parameter) {
if (parameters.contains(parameter)) return false;
return parameters.add(parameter);
}
public boolean removeParameter(Parameter parameter) {
return parameters.remove(parameter);
}
public List<Parameter> getParameters() {
return parameters;
}
}