View Javadoc
1   /*
2    * Copyright (c) 2005, The JUNG Authors
3    * All rights reserved.
4    *
5    * This software is open-source under the BSD license; see either "license.txt"
6    * or https://github.com/jrtom/jung/blob/master/LICENSE 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  	 */
25      int getModifiers();
26  
27      /**
28       * @param modifiers the mouse event modifiers that will activate this plugin
29       */
30      void setModifiers(int modifiers);
31      
32      /**
33       * compare the set modifiers against those of the supplied event
34       * @param e an event to compare to
35       * @return whether the member modifiers match the event modifiers
36       */
37      boolean checkModifiers(MouseEvent e);
38  }