Andreas,

I understood your problem.
It is not the splitframe that you need worry about.  The splitframe is
passing any resize callback to the canvas, but for some reason the canvas's
internal minimum size is being set to the canvas's size every time the
canvas is enlarged, thus preventing you from ever shrinking it.

Therefore, to re-iterate what I said before you MUST overdide the methods
which deal with resizing in the canvas class in order to over come this
problem.  I have attached an ammended version of your program which does
this successfully.  Note that the overridden canvas class (MyCanvas3D) is at
the end of the listing.  Also note that there is an additional line in the
code which sets the the splitframe to continous layout :

/*line 99*/        ivjJSplitPane1.setContinuousLayout(true);

This allows you to see the lightweight splitframe divider when it is moved
(by redrawing the canvas during the resize).  Howevere this does cause some
flicker.

Hope this helps,

Andy


-----Original Message-----
From: Andreas Ebbert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 19, 2000 12:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] JSplitPane and Canvas3D


Hi Andrew,

Andrew Phelps wrote:

> The solution to your problem is to extend the canvas and override two
> methods which control the size of the canvas.  (This applies to Canvas and
> Canvas3D).  I'm not sure if this is a lightweight/heavyweight problem or a
> problem with layout.
> Add the following code to your canvas subclass and the problem is fixed.

Hm, I don't think that this will solve my problem. I think I have to
describe
my problem more detailed, maybe it was not so clear.

In a JSplitPane which is split horizontally there are two Components. The
left
Component is a JTree and the right Component is a Canvas3D. You should be
able
to drag the JSplitPane-divider to resize both components. However, I can
only
move the divider to the left: So the JTree gets smaller and Canvas3D gets
bigger. I am not able to move the divider to the right.

I created a little Demo, so you can see, what I mean :-)

Best Regards,

Andreas


> -----Original Message-----
> From: Andreas Ebbert [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 15, 2000 12:16 PM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] JSplitPane and Canvas3D
>
> Hi,
>
> I have a canvas3d in a JSplitPane and now the divider will not move
anymore
> because it gets no events when it is dragged over canvas3d. is this
another
> topic of lightweight/heavyweight or am I just too dumb?
>
> Thanks for your comments!
>
> Andreas
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".

JSplitPaneTest2.java

Reply via email to