Re: Java3D bug using JDK11
Posted by philjord on Sep 30, 2019; 9:22am
URL: https://forum.jogamp.org/Java3D-bug-using-JDK11-tp4039952p4040076.html
Hi, I'm Phil the main developer of JAva3D. I've looked into this and for the life of me I can't get a middle mouse button to register a drag on a component no matter what JDK I use, below is my code.
So I guess whatever was registering your middle mouse button (and the loss of it) is something specific to the JVM and JDK you are using. Sorry I can't be more help here.
The EventCatcher will only fire on a mouse motion drag event and the MouseZoom requires the alt key to be pressed at the same time, so perhaps some flavors of Linux pass this as a mouse middle button drag event, and the MouseZoom was being helpful.
public static SimpleUniverse createUniverse() {
GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
Canvas3D c = new Canvas3D(config);
SimpleUniverse univ = new SimpleUniverse(c);
univ.getViewingPlatform().setNominalViewingTransform();
univ.getViewer().getView().setMinimumFrameCycleTime(5);
MouseMotionListener mml = new MouseMotionListener() {
@Override
public void mouseDragged(MouseEvent e) {
System.out.println("my one! " + e);
}
@Override
public void mouseMoved(MouseEvent e) {
// TODO Auto-generated method stub
}
};
c.addMouseMotionListener(mml);
return univ;
}