Bob,

> As for the problem...  Are you simply looking to
> re-dispatch the event from the canvas to the overlay
> panel, and then re-dispatch again to the canvas if the
> panel doesn't make use of it?
Yes!  This is essentially what I am trying to do.  I am using
"dispatch(overlayPanel)", but my overlay panel doesnt seem to forward those
events to things such as scrollbars.  So I can intercept all the events
that I would like, but I dont know what to do with them.

> If you want to share the code early I'd be happy to
> help try to figure it out (assuming the gurus on this
> list don't have the answer for you already).
I would really REALLY appreciate your help.  I havent heard back from
anyone else yet, though I know lots of people would like this code.

I have attached the 3 critical files.  (you will need to change their
package based on where you put them in your project)

1) OverlayGraphics
You should not need to play with this.  The other 2 files simply need to
know where it is.  It is essentially a graphics context, that can safely be
replicated via create(), that forwards all legal graphics operations on it
to its J3DGraphics3D reference.

2) OverlayPanel
This is where you add your components you want to be overlayed.  Use it as
any other JPanel.  If using forte/netbeans, you can layout a regular
JPanel, but then instruct the IDE to initialize the object as an
OverlayPanel.  This is the Custom Creation Code field in the Code
Generation tab of the component inspector.  For simplicity sake, make sure
your overlayPanel is within your OverlayCanvas3D (see below).

3) OverlayCanvas3D
Use this as you would your normal Canvas3D.  It needs a reference to your
OverlayPanel.e

What I did was add an Overlay Panel to a JFrame with an AbsoluteLayout.  I
also added a regular JPanel to the JFrame with an Absolute Layout.  I then
added my OverlayCanvas3D to the regular JPanel.

I think that the code that needs to be played with is the commented out
section of the OverlayCanvas3D.  I dont know how to take those events and
then get them to the OverlayPanel such that whatever is in the OverlayPanel
can deal with them.

Please let me know if you have any questions or issues!
I hope you can help! :)

Sincerely,
Ian Nieves

Attachment: OverlayPanel.java
Description: Binary data

Attachment: OverlayCanvas3D.java
Description: Binary data

Attachment: OverlayGraphics.java
Description: Binary data

Reply via email to