Coverage details for net.sourceforge.demetrix.ui.AboutDialog

LineHitsSource
1 /*******************************************************************************
2  * Demetrix process modelling system
3  *
4  * Copyright (c) 2003, 2004 Dimitri A. Pissarenko
5  *
6  * This file is part of Demetrix.
7  *
8  * Demetrix is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * Demetrix is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Demetrix; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  *
22  * For further information you may
23  *
24  * - send an e-mail in Russian, German or English to dimitri.pissarenko@gmx.net
25  * - look at http://sourceforge.net/projects/demetrix/
26  * - look at http://demetrix.sourceforge.net/
27  * - look at http://members.inode.at/d.pissarenko/
28  *
29  *****************************************************************************/
30 package net.sourceforge.demetrix.ui;
31 import java.awt.event.ActionEvent;
32 import javax.swing.AbstractAction;
33 import javax.swing.JButton;
34 import javax.swing.JDialog;
35 import javax.swing.JLabel;
36 import net.sourceforge.demetrix.Demetrix;
37  
38 import org.apache.log4j.Logger;
39 import org.swixml.SwingEngine;
40 /**
41  * @author Dimitri Pissarenko
42  *
43  */
440public class AboutDialog {
45     private Logger logger = Logger.getLogger(getClass());
46     private JDialog dialog;
47     public JLabel productNameAndVersionLabel;
48     public JLabel productDescriptionLabel;
49     public JLabel copyRightLabel;
50     public JLabel homePageLabel;
51     public JButton okButton;
521    public AbstractAction okButtonAction = new AbstractAction() {
53         public void actionPerformed(ActionEvent event) {
54             dialog.hide();
55         }
56     };
57     public final static String UI_DEF_FILE_NAME="net/sourceforge/demetrix/ui/AboutDialog.xml";
581    public AboutDialog() {
59         try {
601            this.dialog =
61                 (JDialog) (new SwingEngine(this)).render(
62                     ClassLoader.getSystemClassLoader().getResource(UI_DEF_FILE_NAME));
631            this.dialog.pack();
640        } catch (Exception exception) {
65             this.logger.error("", exception);
661        }
671        this.productNameAndVersionLabel.setText(
68             Demetrix.PRODUCT_NAME + " " + Demetrix.PRODUCT_VERSION);
691        this.productDescriptionLabel.setText(Demetrix.PRODUCT_DESCRIPTION);
701        this.copyRightLabel.setText(Demetrix.COPYRIGHT);
711        this.homePageLabel.setText(
72             "<html><a href="
73                 + Demetrix.HOMEPAGE
74                 + ">"
75                 + Demetrix.HOMEPAGE
76                 + "</a>");
771        this.dialog.pack();
781    }
79     public JDialog getDialog() {
801        return this.dialog;
81     }
82 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.