package org.helioviewer.jhv.camera;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

import org.helioviewer.jhv.display.Displayer;
import org.helioviewer.jhv.display.Viewport;

import com.jogamp.opengl.GL2;

public class Interaction implements MouseWheelListener, MouseMotionListener, MouseListener, KeyListener {

    protected final Camera camera;

    public Interaction(Camera _camera) {
        camera = _camera;
    }

    public void drawInteractionFeedback(Viewport vp, GL2 gl) {
    }

    @Override
    public void mouseWheelMoved(MouseWheelEvent e) {
        camera.zoom(Displayer.CAMERA_ZOOM_MULTIPLIER_WHEEL * e.getWheelRotation());
        Displayer.render(1);
    }

    @Override
    public void mouseDragged(MouseEvent e) {
    }

    @Override
    public void mouseReleased(MouseEvent e) {
    }

    @Override
    public void mouseMoved(MouseEvent e) {
    }

    @Override
    public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2) {
            camera.reset();
        }
    }

    @Override
    public void mouseEntered(MouseEvent e) {
    }

    @Override
    public void mouseExited(MouseEvent e) {
    }

    @Override
    public void mousePressed(MouseEvent e) {
    }

    @Override
    public void keyTyped(KeyEvent e) {
    }

    @Override
    public void keyPressed(KeyEvent e) {
    }

    @Override
    public void keyReleased(KeyEvent e) {
    }

}

@@ -30,16 +30,89 @@
 amera;%0A%0A
+import java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A
 import j
@@ -131,24 +131,24 @@
 t.KeyEvent;%0A
-
 import java.
@@ -366,16 +366,43 @@
 tener;%0A%0A
+import javax.swing.Timer;%0A%0A
 import o
@@ -657,16 +657,52 @@
  camera;
+%0A    private final Timer wheelTimer;
 %0A%0A    pu
@@ -757,24 +757,278 @@
 a = _camera;
+%0A%0A        wheelTimer = new Timer(1000/10, new ActionListener() %7B%0A            @Override%0A            public void actionPerformed(ActionEvent actionEvent) %7B%0A                Displayer.render(1);%0A            %7D%0A        %7D);%0A        wheelTimer.setRepeats(false);
 %0A    %7D%0A%0A    
@@ -1244,16 +1244,17 @@
 ion());%0A
+%0A
         
@@ -1266,25 +1266,57 @@
 ayer.render(
-1
+0.5);%0A        wheelTimer.restart(
 );%0A    %7D%0A%0A  

Improve mouse wheel interactivity