01: /*
02: * Copyright (C) 2005 Jeff Tassin
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package com.jeta.swingbuilder.gui.main;
20:
21: import java.awt.BorderLayout;
22:
23: import javax.swing.JEditorPane;
24:
25: import com.jeta.forms.components.panel.FormPanel;
26: import com.jeta.forms.support.AbeilleForms;
27: import com.jeta.open.gui.framework.JETAPanel;
28: import com.jeta.open.i18n.I18N;
29: import com.jeta.swingbuilder.gui.utils.FormDesignerUtils;
30:
31: /**
32: * The about box view for the application.
33: *
34: * @author Jeff Tassin
35: */
36: public class AboutView extends JETAPanel {
37:
38: private FormPanel m_view;
39:
40: public AboutView() {
41: setLayout(new BorderLayout());
42: m_view = new FormPanel(
43: "com/jeta/swingbuilder/gui/main/aboutView.jfrm");
44: add(m_view, BorderLayout.CENTER);
45: createCreditsPanel();
46:
47: String licensee = I18N.getLocalizedMessage("Unlicensed");
48: String license = I18N.getLocalizedMessage("Evaluation");
49: String serialno = I18N.getLocalizedMessage("None");
50:
51: String version = null;
52: if (FormDesignerUtils.isDebug()) {
53: version = AbeilleForms.getVersion();
54: } else {
55: version = I18N.format("forms_version_2", AbeilleForms
56: .getVersion(), String
57: .valueOf(AbeilleForms.BUILD_NUMBER));
58: }
59:
60: m_view.setText("version.label", "Version "
61: + com.jeta.forms.support.AbeilleForms.getVersionEx());
62: }
63:
64: public void createCreditsPanel() {
65: JEditorPane editor = (JEditorPane) m_view
66: .getComponentByName(AboutViewNames.ID_CREDITS);
67: editor.setEditorKit(new javax.swing.text.html.HTMLEditorKit());
68: try {
69: java.net.URL url = AboutView.class
70: .getClassLoader()
71: .getResource(
72: "com/jeta/swingbuilder/resources/help/credits.htm");
73: editor.setPage(url);
74: editor.setEditable(false);
75: } catch (Exception e) {
76: e.printStackTrace();
77: }
78: }
79:
80: }
|