OSDN Git Service

Apache Commons DBUtilsのライセンス情報を追加した #25463
[nt-manager/nt-manager.git] / src / twitter / gui / form / AboutDialog.java
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5
6 /*
7  * AboutDialog.java
8  *
9  * Created on 2010/09/06, 17:04:19
10  */
11 package twitter.gui.form;
12
13 import java.awt.Desktop;
14 import java.net.URL;
15
16 /**
17  *
18  * @author nishio
19  */
20 public class AboutDialog extends javax.swing.JDialog {
21
22     /** Creates new form AboutDialog */
23     public AboutDialog(java.awt.Frame parent, boolean modal) {
24         super(parent, modal);
25         initComponents();
26
27         //デフォルトボタン
28         this.getRootPane().setDefaultButton(jButton1);
29     }
30
31     /** This method is called from within the constructor to
32      * initialize the form.
33      * WARNING: Do NOT modify this code. The content of this method is
34      * always regenerated by the Form Editor.
35      */
36     @SuppressWarnings("unchecked")
37     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
38     private void initComponents() {
39
40         jLabel1 = new javax.swing.JLabel();
41         jButton1 = new javax.swing.JButton();
42         jScrollPane1 = new javax.swing.JScrollPane();
43         jTextArea1 = new javax.swing.JTextArea();
44         jButton2 = new javax.swing.JButton();
45
46         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
47         setTitle("About Nishio Tweet Manager");
48
49         jLabel1.setText("Nishio Tweet Manager version 0.6");
50
51         jButton1.setText("OK");
52         jButton1.addActionListener(new java.awt.event.ActionListener() {
53             public void actionPerformed(java.awt.event.ActionEvent evt) {
54                 jButton1ActionPerformed(evt);
55             }
56         });
57
58         jTextArea1.setColumns(20);
59         jTextArea1.setRows(5);
60         jTextArea1.setText("本ソフトウェアはテスト段階のプログラムです。\n信頼性,完全性については一切保証しておりません。\n\n本ソフトウェアを利用したことにより、利用者が何らかの損害、\n不利益を被った場合でも、製作者はその責任を一切負いません。\n\nプログラムの更新情報等は下記サイトにて確認してください。\n意見要望もいつでも受け付けます.気軽に送ってください。\n\nhttp://densan-labs.net/software/ntm\n\nこのソフトウェアは以下のライブラリを利用しています.\n\nTwitter4Jを利用しています。\nCopyright (c) 2007 Yusuke Yamamoto All rights reserved. \nBSD Licenseに基づき使用を許可されています。\n\nOpenCSV http://opencsv.sourceforge.net/ を利用しています。\nApache License2.0に基づき使用を許可されています。\n\nApache Commons DBUtils http://commons.apache.org/dbutils/ を利用しています。\nApache License2.0に基づき使用を許可されています。");
61         jScrollPane1.setViewportView(jTextArea1);
62
63         jButton2.setText("サイトへ行く");
64         jButton2.addActionListener(new java.awt.event.ActionListener() {
65             public void actionPerformed(java.awt.event.ActionEvent evt) {
66                 jButton2ActionPerformed(evt);
67             }
68         });
69
70         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
71         getContentPane().setLayout(layout);
72         layout.setHorizontalGroup(
73             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
74             .addGroup(layout.createSequentialGroup()
75                 .addContainerGap()
76                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77                     .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)
78                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
79                         .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)
80                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
81                         .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
82                     .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE))
83                 .addContainerGap())
84         );
85         layout.setVerticalGroup(
86             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
87             .addGroup(layout.createSequentialGroup()
88                 .addContainerGap()
89                 .addComponent(jLabel1)
90                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
91                 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
92                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
93                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
94                     .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
95                     .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))
96                 .addContainerGap())
97         );
98
99         pack();
100     }// </editor-fold>//GEN-END:initComponents
101
102     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
103         this.setVisible(false);
104     }//GEN-LAST:event_jButton1ActionPerformed
105
106     private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
107         try {
108             // クリック時
109             URL url = new URL("http://densan-labs.net/software/ntm");
110             // デフォルトのブラウザを使ってリンク先を表示
111             Desktop dp = Desktop.getDesktop();
112             dp.browse(url.toURI());
113         } catch (Exception ex) {
114             ex.printStackTrace();
115         }
116     }//GEN-LAST:event_jButton2ActionPerformed
117
118     /**
119      * @param args the command line arguments
120      */
121     public static void main(String args[]) {
122         java.awt.EventQueue.invokeLater(new Runnable() {
123
124             public void run() {
125                 AboutDialog dialog = new AboutDialog(new javax.swing.JFrame(), true);
126                 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
127
128                     public void windowClosing(java.awt.event.WindowEvent e) {
129                         System.exit(0);
130                     }
131                 });
132                 dialog.setVisible(true);
133             }
134         });
135     }
136     // Variables declaration - do not modify//GEN-BEGIN:variables
137     private javax.swing.JButton jButton1;
138     private javax.swing.JButton jButton2;
139     private javax.swing.JLabel jLabel1;
140     private javax.swing.JScrollPane jScrollPane1;
141     private javax.swing.JTextArea jTextArea1;
142     // End of variables declaration//GEN-END:variables
143 }