1 24 25 package org.objectweb.cjdbc.console.gui.popups; 26 27 import java.awt.Component ; 28 import java.awt.event.ActionEvent ; 29 import java.awt.event.ActionListener ; 30 import java.awt.event.MouseEvent ; 31 import java.awt.event.MouseListener ; 32 33 import javax.swing.JPopupMenu ; 34 35 import org.objectweb.cjdbc.console.gui.CjdbcGui; 36 37 43 public abstract class AbstractPopUpMenu extends JPopupMenu 44 implements 45 MouseListener , 46 ActionListener 47 { 48 CjdbcGui gui; 49 50 55 public AbstractPopUpMenu(CjdbcGui gui) 56 { 57 this.gui = gui; 58 } 59 60 63 public void mouseClicked(MouseEvent e) 64 { 65 66 } 67 68 71 public void mouseEntered(MouseEvent e) 72 { 73 74 } 75 76 79 public void mouseExited(MouseEvent e) 80 { 81 82 } 83 84 87 public void mousePressed(MouseEvent e) 88 { 89 if (e.isPopupTrigger()) 90 show((Component ) e.getSource(), e.getX(), e.getY()); 91 } 92 93 96 public void mouseReleased(MouseEvent event) 97 { 98 if (event.isPopupTrigger()) 99 show((Component ) event.getSource(), event.getX(), event.getY()); 100 } 101 102 105 public abstract void actionPerformed(ActionEvent e); 106 } 107 | Popular Tags |