View Javadoc

1   /*
2    *  XNap - A P2P framework and client.
3    *
4    *  See the file AUTHORS for copyright information.
5    *
6    *  This program is free software; you can redistribute it and/or modify
7    *  it under the terms of the GNU General Public License as published by
8    *  the Free Software Foundation.
9    *
10   *  This program is distributed in the hope that it will be useful,
11   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   *  GNU General Public License for more details.
14   *
15   *  You should have received a copy of the GNU General Public License
16   *  along with this program; if not, write to the Free Software
17   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  package org.xnap.commons.gui.wizard;
20  
21  import javax.swing.Icon;
22  import javax.swing.JComponent;
23  import javax.swing.JPanel;
24  
25  /***
26   * Provides the default implementation for a wizard panel. 
27   * 
28   * @author Steffen Pingel
29   */
30  public class DefaultWizardPage extends JPanel implements WizardPage {
31      
32  	private String description;
33  	private Icon icon;
34  	private String title;
35  	
36      public DefaultWizardPage()
37      {
38      }
39  
40      public String getDescription()
41  	{
42  		return description;
43  	}
44  	
45  	public Icon getIcon()
46  	{
47  		return icon;
48  	}
49  	
50  	public JComponent getPanel()
51      {
52  		return this;
53      }
54  
55  	public String getTitle()
56  	{
57  		return title;
58  	}
59  	
60  	public void setDescription(String description)
61  	{
62  		this.description = description;
63  	}
64  	
65  	public void setIcon(Icon icon)
66  	{
67  		this.icon = icon;
68  	}
69  	
70  	public void setTitle(String title)
71  	{
72  		this.title = title;
73  	}
74  
75  	public boolean apply()
76  	{
77  		return true;
78  	}
79  
80  }