View Javadoc

1   package com.explosion.expfmodules.wizard.standard.view;
2   
3   import java.awt.Component;
4   
5   import javax.swing.JPanel;
6   
7   import com.explosion.expfmodules.wizard.StepDefinition;
8   import com.explosion.expfmodules.wizard.StepView;
9   
10  
11  /* =============================================================================
12   *       
13   *     Copyright 2004 Stephen Cowx
14   *
15   *     Licensed under the Apache License, Version 2.0 (the "License");
16   *     you may not use this file except in compliance with the License.
17   *     You may obtain a copy of the License at
18   *
19   *     http://www.apache.org/licenses/LICENSE-2.0
20   *
21   *     Unless required by applicable law or agreed to in writing, software
22   *     distributed under the License is distributed on an "AS IS" BASIS,
23   *     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24   *     See the License for the specific language governing permissions and
25   *     limitations under the License.
26   * 
27   * =============================================================================
28   */
29  
30  /***
31   * @author Stephen Cowx
32   * Created on 21-Feb-2005
33   */
34  public abstract class StandardStepView extends JPanel implements StepView
35  {
36      private Component parent;
37      
38      /***
39       * @see com.explosion.expfmodules.wizard.StepView#init(com.explosion.expfmodules.wizard.StepDefinition, java.awt.Component)
40       * @param stepDefinition
41       */
42      public abstract void init(StepDefinition stepDefinition) throws Exception;
43      
44      /***
45       * Allows the parent to be set for this class
46       * @param parent
47       */
48      public void setUltimateParent(Component parent)
49      {
50          this.parent = parent;
51      }
52      
53      /***
54       * Returns the component which is the ultimate parent of this wizard, usually the application frame.
55       * @see java.awt.Component#getParent()
56       * @return
57       */
58      public Component getUltimateParent()
59      {
60          return parent;
61      }
62  
63  }