From d4c1ddcc90c1e2e8660598fc36b3772d2bff6816 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 15 May 2008 23:08:33 +0000 Subject: 1 Moved the stuff to trunk! --- sources/simulator/VSAbout.java | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 sources/simulator/VSAbout.java (limited to 'sources/simulator/VSAbout.java') diff --git a/sources/simulator/VSAbout.java b/sources/simulator/VSAbout.java new file mode 100644 index 0000000..4b68598 --- /dev/null +++ b/sources/simulator/VSAbout.java @@ -0,0 +1,63 @@ +package simulator; + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import javax.swing.border.*; +import javax.swing.filechooser.*; +import java.util.*; +import java.io.File; + +import prefs.*; +import utils.*; + +public class VSAbout extends VSFrame implements ActionListener { + private VSPrefs prefs; + + public VSAbout(VSPrefs prefs, Component relativeTo) { + super(prefs.getString("name") + " - " + + prefs.getString("lang.about"), relativeTo); + + this.prefs = prefs; + disposeWithParent(); + setContentPane(createContentPane()); + setSize(350, 250); + setResizable(false); + setVisible(true); + } + + + public Container createContentPane() { + Container contentPane = getContentPane(); + + VSInfoArea infoArea = new VSInfoArea(prefs.getString("lang.about.info!")); + JPanel buttonPane = createButtonPane(); + JScrollPane scrollPane = new JScrollPane(infoArea); + + contentPane.add(scrollPane, BorderLayout.CENTER); + contentPane.add(buttonPane, BorderLayout.SOUTH); + + return contentPane; + } + + public JPanel createButtonPane() { + JPanel buttonPane = new JPanel(); + buttonPane.setBackground(Color.WHITE); + + JButton closeButton = new JButton( + prefs.getString("lang.close")); + closeButton.setMnemonic(prefs.getInteger("keyevent.close")); + closeButton.addActionListener(this); + buttonPane.add(closeButton); + + return buttonPane; + } + + + public void actionPerformed(ActionEvent e) { + String actionCommand = e.getActionCommand(); + + if (actionCommand.equals(prefs.getString("lang.close"))) + dispose(); + } +} -- cgit v1.2.3