1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.xmlhammer.gui.actions;
22
23 import javax.swing.ImageIcon;
24
25 import org.bounce.RunnableAction;
26 import org.xmlhammer.gui.XMLHammer;
27
28 /***
29 * An action that can be used to show Properties for a specific page.
30 *
31 * @version $Revision$, $Date$
32 * @author Edwin Dankert <edankert@gmail.com>
33 */
34 public class HelpTOCAction extends RunnableAction {
35 private static final long serialVersionUID = 3258134648029526321L;
36
37 private XMLHammer parent = null;
38
39 /***
40 * The constructor for the action which shows Properties for a specific page.
41 *
42 * @param page the page the properties should be shown for.
43 */
44 public HelpTOCAction(XMLHammer parent) {
45 super("Table of Contents");
46
47 putValue(MNEMONIC_KEY, new Integer('T'));
48 putValue(SHORT_DESCRIPTION, "Help Table of Contents");
49 putValue(SMALL_ICON, new ImageIcon(getClass().getResource("/org/xmlhammer/gui/icons/etool16/alltopics_co.gif")));
50
51 this.parent = parent;
52 }
53
54 /***
55 * The implementation of the Page Properties action, called
56 * after a user action.
57 */
58 public void run() {
59 parent.showHelpTOC();
60 }
61 }