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  
20  package org.xnap.gui.wizard;
21  
22  import javax.swing.Icon;
23  import javax.swing.JScrollPane;
24  import javax.swing.JTextArea;
25  import javax.swing.border.EmptyBorder;
26  
27  import java.awt.BorderLayout;
28  import java.awt.Font;
29  
30  import org.xnap.XNap;
31  import org.xnap.gui.AbstractSettingsPanel;
32  import org.xnap.gui.util.GUIHelper;
33  import org.xnap.gui.util.IconHelper;
34  
35  public class NoteWizardPanel extends AbstractSettingsPanel {
36      
37      //--- Data field(s) ---
38  
39      //--- Constructor(s) ---
40  
41      public NoteWizardPanel()
42      {
43  		setLayout(new BorderLayout());
44  
45  		JTextArea jtaNote = new JTextArea(15, 80);
46  		jtaNote.setBorder(new EmptyBorder(5, 5, 5, 5));
47  		jtaNote.setEditable (false);
48          jtaNote.setFont(new Font("Monospaced", Font.PLAIN, 12));
49  		GUIHelper.showFile(jtaNote, "NOTES", XNap.tr("File {0} not found!\nSee http://xnap.sf.net/{0}.txt instead.", "NOTES"));
50  		add(new JScrollPane(jtaNote), BorderLayout.CENTER);
51      }
52  
53      public void apply()
54      {
55      }
56  
57      public String getDescription()
58      {
59  		return XNap.tr("The following notes describe limitations that are present in this version of XNap.");
60      }
61  
62      public Icon getIcon()
63      {
64  		return IconHelper.getWizardIcon("document2.png");
65      }
66  
67      public String getTitle()
68      {
69  		return "Release Notes";
70      }
71  
72  }