You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//The Layout class is an organizational tool. A layout consists of a combination of containers (found in Container.pde).
3
+
classLayout {
4
+
5
+
Container[] myContainers;
6
+
int[] containerInts;
7
+
8
+
Layout(int[] _myContainers){ //when creating a new layout, you pass in the integer #s of the containers you want as part of the layout ... so if I pass in the array {5}, my layout is 1 container that takes up the whole GUI body
9
+
//constructor stuff
10
+
myContainers =newContainer[_myContainers.length]; //make the myContainers array equal to the size of the incoming array of ints
11
+
containerInts =newint[_myContainers.length];
12
+
for(int i =0; i < _myContainers.length; i++){
13
+
myContainers[i] = container[_myContainers[i]];
14
+
containerInts[i] = _myContainers[i];
15
+
}
16
+
}
17
+
18
+
ContainergetContainer(int_numContainer){
19
+
if(_numContainer < myContainers.length){
20
+
return myContainers[_numContainer];
21
+
} else{
22
+
println("Widget Manager: Tried to return a non-existant container...");
0 commit comments