View Javadoc

1   /*
2    * Copyright (c) 2005, 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    * Created on Jul 6, 2005
9    */
10  
11  package edu.uci.ics.jung.visualization.control;
12  
13  import java.awt.event.MouseEvent;
14  
15  /**
16   * the interface for all plugins to the PluggableGraphMouse
17   * @author Tom Nelson 
18   *
19   */
20  public interface GraphMousePlugin {
21  
22  	/**
23  	 * return the mouse event modifiers that will activate this plugin
24  	 * @return modifiers
25  	 */
26      int getModifiers();
27  
28      /**
29       * set the mouse event modifiers that will activate this plugin
30       * @param modifiers
31       */
32      void setModifiers(int modifiers);
33      
34      /**
35       * compare the set modifiers against those of the supplied event
36       * @param e an event to compare to
37       * @return whether the member modifers match the event modifiers
38       */
39      boolean checkModifiers(MouseEvent e);
40  
41  }