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

LineHitsSource
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  * an implementation of the AbstractModalGraphMouse that includes plugins for
17  * manipulating a view that is using a LensTransformer.
18  *
19  * @author Tom Nelson - RABA Techologies
20  *
21  */
22 public class ModalLensGraphMouse extends AbstractModalGraphMouse implements
23         ModalGraphMouse {
24  
25     /**
26      * not included in the base class
27      */
28     protected LensMagnificationGraphMousePlugin magnificationPlugin;
29     
30     public ModalLensGraphMouse() {
310        this(1.1f, 1/1.1f);
320    }
33  
34     public ModalLensGraphMouse(float in, float out) {
350        this(in, out, new LensMagnificationGraphMousePlugin());
360    }
37  
38     public ModalLensGraphMouse(LensMagnificationGraphMousePlugin magnificationPlugin) {
390        this(1.1f, 1/1.1f, magnificationPlugin);
400    }
41     
420    public ModalLensGraphMouse(float in, float out, LensMagnificationGraphMousePlugin magnificationPlugin) {
430        this.in = in;
440        this.out = out;
450        this.magnificationPlugin = magnificationPlugin;
460        loadPlugins();
470    }
48     
49     protected void loadPlugins() {
500        pickingPlugin = new PickingGraphMousePlugin();
510        animatedPickingPlugin = new AnimatedPickingGraphMousePlugin();
520        translatingPlugin = new LensTranslatingGraphMousePlugin(InputEvent.BUTTON1_MASK);
530        scalingPlugin = new ScalingGraphMousePlugin(new LayoutScalingControl(), 0, in, out);
540        rotatingPlugin = new RotatingGraphMousePlugin();
550        shearingPlugin = new ShearingGraphMousePlugin();
56         
570        add(magnificationPlugin);
580        add(scalingPlugin);
59  
600        setMode(Mode.TRANSFORMING);
610    }
62 }

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.