1 package org.telscenter.pas.authortool.actions;
2
3 import java.awt.event.ActionEvent;
4
5 import javax.swing.AbstractAction;
6 import javax.swing.ImageIcon;
7
8 import org.telscenter.pas.authortool.cards.CardProvider;
9 import org.telscenter.pas.authortool.cards.about.AboutCard;
10 import org.telscenter.pas.authortool.context.CurnitAuthoringContext;
11 import org.telscenter.pas.authortool.statusbar.StatusBarProvider;
12
13 /***
14 * Action code for About action. This action is used by the buttons in the button bar.
15 * @see org.telscenter.pas.authortool.buttonbar.ButtonBarProvider
16 *
17 * @author Anthony Perritano
18 *
19 * @version $Id: $
20 */
21
22
23 public class AboutAction extends AbstractAction {
24
25 private static final long serialVersionUID = 1L;
26
27 private final CurnitAuthoringContext curnitAuthoringContext;
28
29 public AboutAction(final CurnitAuthoringContext curnitAuthoringContext) {
30 super("About", new ImageIcon(AboutAction.class
31 .getResource("icons/about16.png")));
32 this.curnitAuthoringContext = curnitAuthoringContext;
33 this.putValue(SHORT_DESCRIPTION, "Who made this and why?");
34 }
35
36 public void actionPerformed(final ActionEvent e) {
37 final CardProvider cardProvider = curnitAuthoringContext
38 .getCardProvider();
39 cardProvider.showCard(AboutCard.class);
40
41 StatusBarProvider.getInstance()
42 .setStatusMessage("About Action fired!!");
43 }
44
45 }