1 package org.glassbox.gui;
2
3 import org.glassbox.SwingFactory;
4
5 import java.awt.LayoutManager;
6 import java.awt.event.ComponentAdapter;
7 import java.awt.event.ComponentEvent;
8
9 /***
10 A decorator to build nested layouts.
11 */
12 public class LayoutLayerDecorator extends LayoutLayer {
13 protected LayoutLayer _delegate;
14
15 public LayoutLayerDecorator(LayoutManager layout, String themeprefix, boolean resize, LayoutLayer delegate, Object delegateconstraints) {
16 super(layout, themeprefix, resize);
17 _delegate = delegate;
18 getView().add(delegate.getView(), delegateconstraints);
19 }
20
21 public LayoutLayerDecorator(LayoutManager layout, String themeprefix, boolean resize, LayoutLayer delegate) {
22 super(layout, themeprefix, resize);
23 _delegate = delegate;
24 getView().add(delegate.getView());
25 }
26
27 public void addVisible(Visible view, Object constraints) {
28 _delegate.addVisible(view, constraints);
29 }
30
31 public void addVisible(Visible view) {
32 _delegate.addVisible(view);
33 }
34
35 public void removeVisible(Visible view) {
36 _delegate.removeVisible(view);
37 }
38 }