01: package org.wings;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: /**
07: * Provides a LayoutManager which just writes the components one after another.
08: *
09: * @author ole
10: *
11: */
12: public class SNullLayout extends SAbstractLayoutManager {
13:
14: protected ArrayList components = new ArrayList(2);
15:
16: public void addComponent(SComponent c, Object constraint, int index) {
17: components.add(index, c);
18: }
19:
20: public void removeComponent(SComponent c) {
21: components.remove(c);
22: }
23:
24: /**
25: * returns a list of all components
26: *
27: * @return all components
28: */
29: public List getComponents() {
30: return components;
31: }
32:
33: /**
34: * returns the component at the given position
35: *
36: * @param i position
37: * @return component
38: */
39: public SComponent getComponentAt(int i) {
40: return (SComponent) components.get(i);
41: }
42:
43: }
|