01: package com.tagtraum.perf.gcviewer.action;
02:
03: import com.tagtraum.perf.gcviewer.AboutDialog;
04: import com.tagtraum.perf.gcviewer.GCViewer;
05:
06: import javax.swing.*;
07: import java.awt.*;
08: import java.awt.event.ActionEvent;
09:
10: /**
11: *
12: * @author <a href="mailto:hs@tagtraum.com">Hendrik Schreiber</a>
13: * Date: May 20, 2005
14: * Time: 1:45:11 PM
15: *
16: */
17: public class About extends AbstractAction {
18: private AboutDialog aboutDialog;
19:
20: public About(final GCViewer gcViewer) {
21: aboutDialog = new AboutDialog(gcViewer);
22: putValue(NAME, GCViewer.localStrings
23: .getString("main_frame_menuitem_about"));
24: putValue(SHORT_DESCRIPTION, GCViewer.localStrings
25: .getString("main_frame_menuitem_hint_about"));
26: putValue(MNEMONIC_KEY, new Integer(GCViewer.localStrings
27: .getString("main_frame_menuitem_mnemonic_about")
28: .charAt(0)));
29: putValue(ACTION_COMMAND_KEY, "about");
30: putValue(SMALL_ICON, new ImageIcon(Toolkit.getDefaultToolkit()
31: .getImage(
32: gcViewer.getClass().getResource(
33: "images/about.png"))));
34: }
35:
36: public void actionPerformed(final ActionEvent e) {
37: aboutDialog.setVisible(true);
38: }
39: }
|