KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > monitorenter > gui > chart > events > AChart2DAction


1 /*
2  * AChart2DAction, base for actions to trigger on charts.
3  * Copyright (C) Achim Westermann, created on 10.12.2004, 13:48:55
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * If you modify or optimize the code in a useful way please let me know.
20  * Achim.Westermann@gmx.de
21  *
22  */

23 package info.monitorenter.gui.chart.events;
24
25 import info.monitorenter.gui.chart.Chart2D;
26
27 import java.beans.PropertyChangeListener JavaDoc;
28
29 import javax.swing.AbstractAction JavaDoc;
30
31
32 /**
33  * <p>
34  * The base class that connects triggered actions with an
35  * {@link info.monitorenter.gui.chart.Chart2D} instance.
36  * </p>
37  * <p>
38  * Every subclass may delegate it's constructor-given <code>Chart2D</code>
39  * instance as protected member <code>m_chart</code>.
40  * </p>
41  *
42  * @author <a HREF="mailto:Achim.Westermann@gmx.de">Achim Westermann </a>
43  *
44  * @version $Revision: 1.2 $
45  *
46  */

47 public abstract class AChart2DAction extends AbstractAction JavaDoc implements PropertyChangeListener JavaDoc {
48
49   /** The target of this action. */
50   protected Chart2D m_chart;
51
52   /**
53    * Create an <code>Action</code> that accesses the chart and identifies
54    * itself with the given action String.
55    *
56    * @param chart
57    * the target the action will work on
58    * @param description
59    * the descriptive <code>String</code> that will be displayed by
60    * {@link javax.swing.AbstractButton} subclasses that get this
61    * <code>Action</code> assigned (
62    * {@link javax.swing.AbstractButton#setAction(javax.swing.Action)}).
63    */

64   public AChart2DAction(final Chart2D chart, final String JavaDoc description) {
65     super(description);
66     this.m_chart = chart;
67   }
68   
69 }
70
Popular Tags