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 Aug 26, 2005
9    */
10  
11  package edu.uci.ics.jung.visualization.control;
12  
13  import java.awt.event.InputEvent;
14  /**
15   * 
16   * @author Tom Nelson 
17   *
18   */
19  public class ModalSatelliteGraphMouse extends DefaultModalGraphMouse implements
20          ModalGraphMouse {
21  
22      public ModalSatelliteGraphMouse() {
23          this(1.1f, 1/1.1f);
24      }
25  
26      public ModalSatelliteGraphMouse(float in, float out) {
27          super(in, out);
28      }
29      
30      protected void loadPlugins() {
31          pickingPlugin = new PickingGraphMousePlugin();
32          animatedPickingPlugin = new SatelliteAnimatedPickingGraphMousePlugin();
33          translatingPlugin = new SatelliteTranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
34          scalingPlugin = new SatelliteScalingGraphMousePlugin(new CrossoverScalingControl(), 0);
35          rotatingPlugin = new SatelliteRotatingGraphMousePlugin();
36          shearingPlugin = new SatelliteShearingGraphMousePlugin();
37          
38          add(scalingPlugin);
39          
40          setMode(Mode.TRANSFORMING);
41      }
42  }