1 /*****************************************************************************
2 * Virtual Mockup for Machine Vision
3 * Copyright (C) 2001-2003 Fabio R. de Miranda, João E. Kogler Jr.,
4 * Carlos S. Santos.
5 * Virtual Mockup for Machine Vision Project funded by SENAC-SP
6 *
7 * Permission is granted to redistribute and/or modify this
8 * software under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License (http://www.gnu.org/copyleft/lesser.html)
16 * for more details.
17 *
18 *****************************************************************************/
19
20 package camera3d.gui;
21
22 import java.awt.*;
23 import java.awt.event.*;
24 import javax.swing.*;
25 import javax.swing.border.*;
26 import camera3d.test.*;
27
28 /***
29 *
30 * @author Fábio Roberto de Miranda
31 */
32
33 class SelectionListTesterFrame_AboutBox extends JDialog implements ActionListener {
34
35 private JPanel panel1 = new JPanel();
36 private JPanel panel2 = new JPanel();
37 private JPanel insetsPanel1 = new JPanel();
38 private JPanel insetsPanel2 = new JPanel();
39 private JPanel insetsPanel3 = new JPanel();
40 private JButton button1 = new JButton();
41 private JLabel imageLabel = new JLabel();
42 private JLabel label1 = new JLabel();
43 private JLabel label2 = new JLabel();
44 private JLabel label3 = new JLabel();
45 private JLabel label4 = new JLabel();
46 private BorderLayout borderLayout1 = new BorderLayout();
47 private BorderLayout borderLayout2 = new BorderLayout();
48 private FlowLayout flowLayout1 = new FlowLayout();
49 private GridLayout gridLayout1 = new GridLayout();
50 private String product = "C\u00e2mera Virtual - LIVES";
51 private String version = "1.0";
52 private String copyright = "Copyright (c) 2001";
53 private String comments = "C\u00e2mera Virtual para Controle via LabVIEW";
54 public SelectionListTesterFrame_AboutBox(Frame parent) {
55 super(parent);
56 enableEvents(AWTEvent.WINDOW_EVENT_MASK);
57 try {
58 jbInit();
59 }
60 catch(Exception e) {
61 e.printStackTrace();
62 }
63 pack();
64 }
65 /***Component initialization*/
66 private void jbInit() throws Exception {
67 //imageLabel.setIcon(new ImageIcon(SelectionListTesterFrame_AboutBox.class.getResource("[Your Image]")));
68 this.setTitle("About");
69 setResizable(false);
70 panel1.setLayout(borderLayout1);
71 panel2.setLayout(borderLayout2);
72 insetsPanel1.setLayout(flowLayout1);
73 insetsPanel2.setLayout(flowLayout1);
74 insetsPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
75 gridLayout1.setRows(4);
76 gridLayout1.setColumns(1);
77 label1.setText(product);
78 label2.setText(version);
79 label3.setText(copyright);
80 label4.setText(comments);
81 insetsPanel3.setLayout(gridLayout1);
82 insetsPanel3.setBorder(BorderFactory.createEmptyBorder(10, 60, 10, 10));
83 button1.setText("Ok");
84 button1.addActionListener(this);
85 insetsPanel2.add(imageLabel, null);
86 panel2.add(insetsPanel2, BorderLayout.WEST);
87 this.getContentPane().add(panel1, null);
88 insetsPanel3.add(label1, null);
89 insetsPanel3.add(label2, null);
90 insetsPanel3.add(label3, null);
91 insetsPanel3.add(label4, null);
92 panel2.add(insetsPanel3, BorderLayout.CENTER);
93 insetsPanel1.add(button1, null);
94 panel1.add(insetsPanel1, BorderLayout.SOUTH);
95 panel1.add(panel2, BorderLayout.NORTH);
96 }
97 /***Overridden so we can exit when window is closed*/
98 protected void processWindowEvent(WindowEvent e) {
99 if (e.getID() == WindowEvent.WINDOW_CLOSING) {
100 cancel();
101 }
102 super.processWindowEvent(e);
103 }
104 /***Close the dialog*/
105 void cancel() {
106 dispose();
107 }
108 /***Close the dialog on a button event*/
109 public void actionPerformed(ActionEvent e) {
110 if (e.getSource() == button1) {
111 cancel();
112 }
113 }
114 }
This page was automatically generated by Maven