source: java/installer2/src/net/oni2/aeinstaller/gui/about/AboutDialog.java@ 838

Last change on this file since 838 was 772, checked in by alloc, 12 years ago

AEI2.00:

  • Version
  • Main win default size
File size: 1.6 KB
Line 
1package net.oni2.aeinstaller.gui.about;
2
3import java.awt.event.ActionEvent;
4import java.awt.event.KeyEvent;
5import java.util.ResourceBundle;
6
7import javax.swing.AbstractAction;
8import javax.swing.JComponent;
9import javax.swing.JDialog;
10import javax.swing.JLabel;
11import javax.swing.KeyStroke;
12
13import net.oni2.aeinstaller.gui.HTMLLinkLabel;
14
15import org.javabuilders.BuildResult;
16import org.javabuilders.swing.SwingJavaBuilder;
17
18/**
19 * @author Christian Illy
20 */
21public class AboutDialog extends JDialog {
22 private static final long serialVersionUID = 1632257865019785612L;
23
24 private ResourceBundle bundle = ResourceBundle.getBundle(getClass()
25 .getName());
26 @SuppressWarnings("unused")
27 private BuildResult result = SwingJavaBuilder.build(this, bundle);
28
29 private JLabel lblAppname;
30 private HTMLLinkLabel txtLinks;
31 private HTMLLinkLabel lblAE;
32
33 /**
34 * Open the dialog
35 */
36 public AboutDialog() {
37 lblAppname.setText(SwingJavaBuilder.getConfig().getResource("appname")
38 + SwingJavaBuilder.getConfig().getResource("appversion"));
39
40 txtLinks.setText(bundle.getString("Links"));
41 lblAE.setText(bundle.getString("ae"));
42
43 pack();
44
45 AbstractAction closeAction = new AbstractAction() {
46
47 private static final long serialVersionUID = 1L;
48
49 public void actionPerformed(ActionEvent arg0) {
50 dispose();
51 }
52 };
53 KeyStroke ksCtrlW = KeyStroke
54 .getKeyStroke('W', KeyEvent.CTRL_DOWN_MASK);
55 getRootPane()
56 .getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
57 .put(ksCtrlW, "close");
58 getRootPane().getActionMap().put("close", closeAction);
59
60 setLocationRelativeTo(null);
61 }
62
63}
Note: See TracBrowser for help on using the repository browser.