KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > shark > swingclient > ActionBase


1 package org.enhydra.shark.swingclient;
2
3 import javax.swing.*;
4
5 /**
6 * The base class for actions.
7 */

8 public abstract class ActionBase extends AbstractAction {
9
10    /** The panel for this action. */
11    protected ActionPanel actionPanel;
12
13    /**
14     * The Abstract action uses unqualified class name as action name.
15     *
16     * @param actionPanel The reference to the panel for this action
17     */

18    public ActionBase(ActionPanel actionPanel) {
19       this.actionPanel=actionPanel;
20       putValue(Action.NAME,Utils.getUnqualifiedClassName(getClass()));
21    }
22
23    /**
24     * Constructor which accepts the action name.
25     *
26     * @param actionPanel The reference to the panel for this action
27     * @param name Name of this action
28     */

29    public ActionBase(ActionPanel actionPanel,String JavaDoc name) {
30       super(name);
31       this.actionPanel=actionPanel;
32    }
33
34 }
35
Popular Tags