01: package org.enhydra.shark.swingclient;
02:
03: import javax.swing.*;
04:
05: /**
06: * The base class for actions.
07: */
08: public abstract class ActionBase extends AbstractAction {
09:
10: protected int actionPerformed = 0;
11:
12: /** The panel for this action. */
13: protected ActionPanel actionPanel;
14:
15: /**
16: * The Abstract action uses unqualified class name as action name.
17: *
18: * @param actionPanel The reference to the panel for this action
19: */
20: public ActionBase(ActionPanel actionPanel) {
21: this .actionPanel = actionPanel;
22: putValue(Action.NAME, Utils.getUnqualifiedClassName(getClass()));
23: }
24:
25: /**
26: * Constructor which accepts the action name.
27: *
28: * @param actionPanel The reference to the panel for this action
29: * @param name Name of this action
30: */
31: public ActionBase(ActionPanel actionPanel, String name) {
32: super(name);
33: this.actionPanel = actionPanel;
34: }
35:
36: }
|