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.Page;
27
28 /***
29 * An action that can be used to show Properties for a specific page.
30 *
31 * @version $Revision: 1.4 $, $Date: 2007/07/04 19:42:49 $
32 * @author Edwin Dankert <edankert@gmail.com>
33 */
34 public class PagePropertiesAction extends RunnableAction {
35 private static final long serialVersionUID = 3258134648029526321L;
36
37 private Page page = 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 PagePropertiesAction( Page page) {
45 super( "Properties");
46
47 putValue( SHORT_DESCRIPTION, "Project Properties");
48 putValue( SMALL_ICON, new ImageIcon( getClass().getResource( "/toolbarButtonGraphics/general/Preferences16.gif")));
49
50 this.page = page;
51 }
52
53 /***
54 * The implementation of the Page Properties action, called
55 * after a user action.
56 */
57 public void run() {
58 page.showPropertiesDialog();
59 }
60 }