01: /*
02: * GlassPanePanel.java
03: *
04: * Created on 6 June 2006, 12:15
05: *
06: * To change this template, choose Tools | Template Manager
07: * and open the template in the editor.
08: */
09:
10: package org.underworldlabs.swing;
11:
12: import java.awt.event.MouseEvent;
13: import javax.swing.JPanel;
14: import javax.swing.event.MouseInputListener;
15:
16: /**
17: * Empty non-opaque panel to be used as a glass pane for event capture.
18: *
19: * @author Takis Diakoumis
20: * @version $Revision: 1.2 $
21: * @date $Date: 2006/06/07 16:01:18 $
22: */
23: public class GlassPanePanel extends JPanel implements
24: MouseInputListener {
25:
26: /** Creates a new instance of GlassPanePanel */
27: public GlassPanePanel() {
28: setVisible(false);
29: setOpaque(false);
30: addMouseListener(this );
31: addMouseMotionListener(this );
32: }
33:
34: /**
35: * Override to return false.
36: */
37: public boolean isOpaque() {
38: return false;
39: }
40:
41: /**
42: * Invoked when a mouse button is pressed on a component and then dragged.
43: */
44: public void mouseDragged(MouseEvent e) {
45: }
46:
47: /**
48: * Invoked when the mouse cursor has been moved onto a component
49: * but no buttons have been pushed.
50: */
51: public void mouseMoved(MouseEvent e) {
52: }
53:
54: /**
55: * Invoked when the mouse button has been clicked (pressed
56: * and released) on a component.
57: */
58: public void mouseClicked(MouseEvent e) {
59: }
60:
61: /**
62: * Invoked when a mouse button has been pressed on a component.
63: */
64: public void mousePressed(MouseEvent e) {
65: }
66:
67: /**
68: * Invoked when a mouse button has been released on a component.
69: */
70: public void mouseReleased(MouseEvent e) {
71: }
72:
73: /**
74: * Invoked when the mouse enters a component.
75: */
76: public void mouseEntered(MouseEvent e) {
77: }
78:
79: /**
80: * Invoked when the mouse exits a component.
81: */
82: public void mouseExited(MouseEvent e) {
83: }
84:
85: }
|