View Javadoc

1   /*
2      Copyright 2002-2006 Martin van den Bemt
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15  */
16  package org.xulux.guilayer.swing.layouts;
17  
18  import org.xulux.api.gui.IWidget;
19  import org.xulux.api.gui.IXuluxLayout;
20  
21  /**
22   * An abstract convenience class, so you don't have to reimplement
23   * setParent etc all the time.
24   *
25   * @author <a href="mailto:martin@mvdb.net">Martin van den Bemt</a>
26   * @version $Id: SwingLayoutAbstract.java,v 1.1 2004/05/24 18:12:34 mvdb Exp $
27   */
28  public abstract class SwingLayoutAbstract implements IXuluxLayout {
29  
30      /**
31       * This is the widget that actually created the layout..
32       */
33      protected IWidget parentWidget;
34    
35      /**
36       * 
37       */
38      public SwingLayoutAbstract() {
39      }
40  
41      /**
42       * @see org.xulux.api.gui.IXuluxLayout#setParent(org.xulux.api.gui.IWidget)
43       */
44      public void setParent(IWidget widget) {
45          this.parentWidget = widget;
46      }
47  
48      /**
49       * @see org.xulux.api.gui.IXuluxLayout#getParent()
50       */
51      public IWidget getParent() {
52          return this.parentWidget;
53      }
54  
55      /**
56       * @see org.xulux.api.gui.IXuluxLayout#destroy()
57       */
58      public abstract void destroy();
59  
60  }