KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > console > gui > popups > AbstractPopUpMenu


1 /**
2  * C-JDBC: Clustered JDBC.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: c-jdbc@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Nicolas Modrzyk
22  * Contributor(s): ______________________.
23  */

24
25 package org.objectweb.cjdbc.console.gui.popups;
26
27 import java.awt.Component JavaDoc;
28 import java.awt.event.ActionEvent JavaDoc;
29 import java.awt.event.ActionListener JavaDoc;
30 import java.awt.event.MouseEvent JavaDoc;
31 import java.awt.event.MouseListener JavaDoc;
32
33 import javax.swing.JPopupMenu JavaDoc;
34
35 import org.objectweb.cjdbc.console.gui.CjdbcGui;
36
37 /**
38  * This class defines a AbstractPopUpMenu
39  *
40  * @author <a HREF="mailto:Nicolas.Modrzyk@inria.fr">Nicolas Modrzyk </a>
41  * @version 1.0
42  */

43 public abstract class AbstractPopUpMenu extends JPopupMenu JavaDoc
44     implements
45       MouseListener JavaDoc,
46       ActionListener JavaDoc
47 {
48   CjdbcGui gui;
49
50   /**
51    * Creates a new <code>AbstractPopUpMenu.java</code> object
52    *
53    * @param gui the main gui
54    */

55   public AbstractPopUpMenu(CjdbcGui gui)
56   {
57     this.gui = gui;
58   }
59
60   /**
61    * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
62    */

63   public void mouseClicked(MouseEvent JavaDoc e)
64   {
65
66   }
67
68   /**
69    * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
70    */

71   public void mouseEntered(MouseEvent JavaDoc e)
72   {
73
74   }
75
76   /**
77    * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
78    */

79   public void mouseExited(MouseEvent JavaDoc e)
80   {
81
82   }
83
84   /**
85    * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
86    */

87   public void mousePressed(MouseEvent JavaDoc e)
88   {
89     if (e.isPopupTrigger())
90       show((Component JavaDoc) e.getSource(), e.getX(), e.getY());
91   }
92
93   /**
94    * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
95    */

96   public void mouseReleased(MouseEvent JavaDoc event)
97   {
98     if (event.isPopupTrigger())
99       show((Component JavaDoc) event.getSource(), event.getX(), event.getY());
100   }
101
102   /**
103    * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
104    */

105   public abstract void actionPerformed(ActionEvent JavaDoc e);
106 }
107
Popular Tags