Bugzilla – Attachment 383 Details for
Bug 639
High-Res Mouse-Wheel Support (getWheelRotation() of Newt MouseEvent constantly returns '0' with slow movement)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
The test class.
Test Class.txt (text/plain), 1.59 KB, created by
dan.j.allen
on 2012-11-12 22:53:42 CET
(
hide
)
Description:
The test class.
Filename:
MIME Type:
Creator:
dan.j.allen
Created:
2012-11-12 22:53:42 CET
Size:
1.59 KB
patch
obsolete
>import com.jogamp.newt.awt.NewtCanvasAWT; >import com.jogamp.newt.event.MouseAdapter; >import com.jogamp.newt.event.MouseEvent; >import com.jogamp.newt.opengl.GLWindow; >import com.jogamp.opengl.util.Animator; >import java.awt.BorderLayout; >import javax.media.opengl.GLCapabilities; >import javax.media.opengl.GLProfile; >import javax.swing.JFrame; >import javax.swing.JPanel; > >/** > * A class to test an issue with the value returned by the getWheelRotation() > * method of the Newt MouseEvent. > * @author Daniel Allen > */ >public class MouseWheelError >{ > public static void main(String[] args) > { > GLProfile.initSingleton(); > GLProfile profile = GLProfile.getDefault(); > GLCapabilities capabilities = new GLCapabilities(profile); > GLWindow window = GLWindow.create(capabilities); > window.addMouseListener(new MouseWatcher()); > Animator animator = new Animator(window); > animator.start(); > final NewtCanvasAWT newtCanvas = new NewtCanvasAWT(window); > final JPanel panel = new JPanel(); > panel.setLayout(new BorderLayout()); > panel.add(newtCanvas, BorderLayout.CENTER); > final JFrame frame = new JFrame("Miracle"); > frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); > frame.setContentPane(panel); > frame.setSize(300, 300); > frame.setVisible(true); > } > > private static class MouseWatcher extends MouseAdapter > { > @Override > public void mouseWheelMoved(MouseEvent e) > { > System.out.println(e.getWheelRotation()); > } > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 639
: 383