OSDN Git Service

確実に不要になるクラスを削除
[coroid/inqubus.git] / frontend / src / saccubus / MainFrame_AboutBox.java
1 package saccubus;
2
3 import java.awt.*;
4 import java.awt.event.ActionEvent;
5 import java.awt.event.ActionListener;
6
7 import javax.swing.*;
8
9 import saccubus.util.PopupRightClick;
10
11 /**
12  * <p>
13  * タイトル: さきゅばす
14  * </p>
15  *
16  * <p>
17  * 説明: ニコニコ動画の動画をコメントつきで保存
18  * </p>
19  *
20  * <p>
21  * 著作権: Copyright (c) 2007 PSI
22  * </p>
23  *
24  * <p>
25  * 会社名:
26  * </p>
27  *
28  * @author 未入力
29  * @version 1.0
30  */
31 public class MainFrame_AboutBox extends JDialog implements ActionListener {
32         /**
33          *
34          */
35         private static final long serialVersionUID = -4256413309312729840L;
36
37         String version = "ver1.22r(2008/04/27)";
38
39         String product =
40             "本プログラムは「さきゅばす」を改変したものであり, \n" + "オリジナルの著作権は以下の通りです.\n\n" +
41                 "さきゅばす\n"+
42                 version + "\n\n"+
43                 "Copyright (C) 2008 Saccubus Developers Team\n"+
44                 "              2007-2008 PSI\n\n"+
45                 "ニコニコ動画の動画をコメントつきで保存";
46
47         JPanel panel1 = new JPanel();
48
49         JPanel panel2 = new JPanel();
50
51         JPanel insetsPanel1 = new JPanel();
52
53         JPanel insetsPanel2 = new JPanel();
54
55         JPanel insetsPanel3 = new JPanel();
56
57         JButton button1 = new JButton();
58
59         JLabel imageLabel = new JLabel();
60
61         JTextArea product_field = new JTextArea(product);
62
63         ImageIcon image1 = new ImageIcon();
64
65         BorderLayout borderLayout1 = new BorderLayout();
66
67         BorderLayout borderLayout2 = new BorderLayout();
68
69         FlowLayout flowLayout1 = new FlowLayout();
70
71         GridLayout gridLayout1 = new GridLayout();
72
73         public MainFrame_AboutBox(Frame parent) {
74                 super(parent);
75                 try {
76                         setDefaultCloseOperation(DISPOSE_ON_CLOSE);
77                         jbInit();
78                 } catch (Exception exception) {
79                         exception.printStackTrace();
80                 }
81         }
82
83         public MainFrame_AboutBox() {
84                 this(null);
85         }
86
87         /**
88          * コンポーネントの初期化。
89          *
90          * @throws java.lang.Exception
91          */
92         private void jbInit() throws Exception {
93                 image1 = new ImageIcon(saccubus.MainFrame_AboutBox.class.getResource("icon.png"));
94                 imageLabel.setIcon(image1);
95                 setTitle("バージョン情報");
96                 panel1.setLayout(borderLayout1);
97                 panel2.setLayout(borderLayout2);
98                 insetsPanel1.setLayout(flowLayout1);
99                 insetsPanel2.setLayout(flowLayout1);
100                 insetsPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
101                 gridLayout1.setRows(1);
102                 gridLayout1.setColumns(1);
103                 insetsPanel3.setLayout(gridLayout1);
104                 insetsPanel3.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
105                 button1.setText("OK");
106                 button1.addActionListener(this);
107                 insetsPanel2.add(imageLabel, null);
108                 panel2.add(insetsPanel2, BorderLayout.WEST);
109                 getContentPane().add(panel1, null);
110                 product_field.setForeground(insetsPanel3.getForeground());
111                 product_field.setBackground(insetsPanel3.getBackground());
112                 product_field.addMouseListener(new PopupRightClick(product_field));
113                 product_field.setEditable(false);
114                 insetsPanel3.add(product_field, null);
115                 panel2.add(insetsPanel3, BorderLayout.CENTER);
116                 insetsPanel1.add(button1, null);
117                 panel1.add(insetsPanel1, BorderLayout.SOUTH);
118                 panel1.add(panel2, BorderLayout.NORTH);
119                 setResizable(true);
120         }
121
122         /**
123          * ボタンイベントでダイアログを閉じる
124          *
125          * @param actionEvent
126          *            ActionEvent
127          */
128         public void actionPerformed(ActionEvent actionEvent) {
129                 if (actionEvent.getSource() == button1) {
130                         dispose();
131                 }
132         }
133 }