edu.uci.ics.jung.visualization.control.ModalLensGraphMouse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jung-visualization Show documentation
Show all versions of jung-visualization Show documentation
Core visualization support for the JUNG project
The newest version!
/*
* Copyright (c) 2005, The JUNG Authors
* All rights reserved.
*
* This software is open-source under the BSD license; see either "license.txt"
* or https://github.com/jrtom/jung/blob/master/LICENSE for a description.
*
* Created on Aug 26, 2005
*/
package edu.uci.ics.jung.visualization.control;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.event.InputEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
/**
* an implementation of the AbstractModalGraphMouse that includes plugins for
* manipulating a view that is using a LensTransformer.
*
* @author Tom Nelson
*
*/
public class ModalLensGraphMouse extends AbstractModalGraphMouse implements
ModalGraphMouse {
/**
* not included in the base class
*/
protected LensMagnificationGraphMousePlugin magnificationPlugin;
public ModalLensGraphMouse() {
this(1.1f, 1/1.1f);
}
public ModalLensGraphMouse(float in, float out) {
this(in, out, new LensMagnificationGraphMousePlugin());
}
public ModalLensGraphMouse(LensMagnificationGraphMousePlugin magnificationPlugin) {
this(1.1f, 1/1.1f, magnificationPlugin);
}
public ModalLensGraphMouse(float in, float out, LensMagnificationGraphMousePlugin magnificationPlugin) {
super(in,out);
this.in = in;
this.out = out;
this.magnificationPlugin = magnificationPlugin;
loadPlugins();
setModeKeyListener(new ModeKeyAdapter(this));
}
protected void loadPlugins() {
pickingPlugin = new PickingGraphMousePlugin
© 2015 - 2024 Weber Informatics LLC | Privacy Policy