01: /*
02: * $Header: /cvs/j3dfly/J3dEditor/src/org/jdesktop/j3dedit/actions/ActionManager.java,v 1.1 2005/04/20 22:20:27 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is the Java 3D(tm) Scene Graph Editor.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dedit.actions;
19:
20: import java.util.HashMap;
21:
22: /**
23: * Central manager for all actions in the editor
24: *
25: * @author Paul Byrne
26: * @version $Revision: 1.1 $
27: */
28: public class ActionManager {
29:
30: private static HashMap actions = new HashMap();
31:
32: /**
33: * Returns the action of the specified class
34: */
35: public static javax.swing.Action getAction(Class actionClass) {
36: return (javax.swing.Action) actions.get(actionClass);
37: }
38:
39: /**
40: * Add the action to the system
41: */
42: static void addAction(javax.swing.Action action) {
43: actions.put(action.getClass(), action);
44: }
45: }
|