Login  Register

Re: Mac Canvas3D location bug

Posted by Sven Gothel on Oct 07, 2013; 2:57pm
URL: https://forum.jogamp.org/Mac-Canvas3D-location-bug-tp4030052p4030187.html

On 10/07/2013 04:49 PM, Manu [via jogamp] wrote:

> Sorry I mixed class names. Here's a better applet test case.
>
> import java.awt.GraphicsEnvironment;
> import javax.media.j3d.*;
> import javax.swing.*;
> import com.sun.j3d.utils.universe.SimpleUniverse;
>
> public class Canvas3DPositionAppletTest extends JApplet {
>   public void init() {
>     // Create a new canvas 3D
>     GraphicsConfigTemplate3D gc = new GraphicsConfigTemplate3D();
>     Canvas3D canvas = new Canvas3D(GraphicsEnvironment.getLocalGraphicsEnvironment().
>         getDefaultScreenDevice().getBestConfiguration(gc));
>     new SimpleUniverse(canvas);
>
>     // Build a GUI where the canvas 3D is located at top right of the frame
>     // and can be resized with split panes dividers
>     JSplitPane horizontalSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
>         true, new JScrollPane(), canvas);
>     horizontalSplitPane.setResizeWeight(0.5);
>     JSplitPane verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
>         true, horizontalSplitPane, new JScrollPane());    
>     verticalSplitPane.setResizeWeight(0.5);
>     JRootPane intermediateRootPane = new JRootPane();
>     intermediateRootPane.setContentPane(verticalSplitPane);
>     add(intermediateRootPane);
>   }
> }
And this is similar w/ which unit test I have added
using your boiler plate ?

> Canvas3DPositionTest -> TestBug816OSXCALayerPos02AWT
this one ?

> Canvas3DVisibilityTest -> TestBug816OSXCALayerPos03AWT
> Canvas3DPositionInDialogTest -> TestBug816OSXCALayerPos04aAWT and TestBug816OSXCALayerPos04bAWT

By now, you might have noticed that the unit tests do not use Java3D,
so I would appreciate if you can use the existing unit tests
and modify them to your needs. This will help both of us to be sure
we test the same thing!

You can still post them here as attachments .. raw or as a git-patch.
A git pull request is also welcome ofc.

>
> It already bugs with Java 6 appletviewer run from the Eclipse IDE, so no need
> of an accompanying HTML file I guess.

I never tried testing w/ Eclipse. But if commandline appletviewer is sufficient .. good.

BTW .. the HW/LW split pane sliding issue might be non-fixable
due to HW/LW mixing .. we have other unit tests for this already
w/ 'Split' in the name AFAIK.

Does it work well on other platforms ? X11, Windows .. ?

~Sven



signature.asc (911 bytes) Download Attachment