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

Last change on this file since 661 was 641, checked in by alloc, 12 years ago

AEI2 0.98:

  • Reduced number+size of HTTP queries
  • Removed "submitter" field
  • Added output of dependencies to be selected before continuing
File size: 1.5 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 lblAppversion;
30 private HTMLLinkLabel txtLinks;
31
32 /**
33 * Open the dialog
34 */
35 public AboutDialog() {
36 lblAppversion.setText("v"
37 + SwingJavaBuilder.getConfig().getResource("appversion"));
38
39 txtLinks.setText(bundle.getString("Links"));
40
41 pack();
42
43 AbstractAction closeAction = new AbstractAction() {
44
45 private static final long serialVersionUID = 1L;
46
47 public void actionPerformed(ActionEvent arg0) {
48 dispose();
49 }
50 };
51 KeyStroke ksCtrlW = KeyStroke
52 .getKeyStroke('W', KeyEvent.CTRL_DOWN_MASK);
53 getRootPane()
54 .getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
55 .put(ksCtrlW, "close");
56 getRootPane().getActionMap().put("close", closeAction);
57
58 setLocationRelativeTo(null);
59 }
60
61}
Note: See TracBrowser for help on using the repository browser.