Coverage details for edu.uci.ics.jung.visualization.control.AbstractPopupGraphMousePlugin

LineHitsSource
1 /*
2  * Copyright (c) 2003, the JUNG Project and the Regents of the University of
3  * California All rights reserved.
4  *
5  * This software is open-source under the BSD license; see either "license.txt"
6  * or http://jung.sourceforge.net/license.txt for a description.
7  *
8  */
9 package edu.uci.ics.jung.visualization.control;
10  
11 import java.awt.event.MouseEvent;
12 import java.awt.event.MouseListener;
13  
14 public abstract class AbstractPopupGraphMousePlugin extends AbstractGraphMousePlugin
15     implements MouseListener {
16     
17     public AbstractPopupGraphMousePlugin() {
180        this(MouseEvent.BUTTON3_MASK);
190    }
20     public AbstractPopupGraphMousePlugin(int modifiers) {
210        super(modifiers);
220    }
23     public void mousePressed(MouseEvent e) {
240        if(e.isPopupTrigger()) {
250            handlePopup(e);
260            e.consume();
27         }
280    }
29     
30     /**
31      * if this is the popup trigger, process here, otherwise
32      * defer to the superclass
33      */
34     public void mouseReleased(MouseEvent e) {
350        if(e.isPopupTrigger()) {
360            handlePopup(e);
370            e.consume();
38         }
390    }
40     
41     /**
42      * @param e
43      */
44     protected abstract void handlePopup(MouseEvent e);
45     
46     public void mouseClicked(MouseEvent e) {
470    }
48     
49     public void mouseEntered(MouseEvent e) {
500    }
51     
52     public void mouseExited(MouseEvent e) {
530    }
54 }

this report was generated by version 1.0.5 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.