Cool, that sounds like normal event handling.

Kyle Wayne Kelly
Computer Science Student
University of New Orleans
http://www.cs.uno.edu/~kkelly
----- Original Message -----
From: "J. Lee Dixon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 7:13 AM
Subject: Re: [JAVA3D] How can I project a Swing components onto a J3D surf
ace?


> I've been using 3D user interfaces for a while now.  Some of them are
> buttons that change color when pressed (by changing the diffuse color),
> others I translate, some even have animations.  But my project is being
> funded by a private client, so I can't just give out a URL.
>
> It's not very hard anyway... I do a "setUserData" on the Shape3D to be
> the button.  If the shape is selected, my Button3D code gets a callback
> (either mouse-click, mouse-released, or mouse-dragged) from my selection
> behavior code (which wakes up on AWT events).  If it is a mouse-click, I
> translate a TransformGroup above the button to make the "press" occur.
> When I get the mouse-released, it return the button to the original
> translation and call any Button3DListeners that have been attached.
>
>
> -Lee
>
> > -----Original Message-----
> > From: Kyle Wayne Kelly [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 25, 2001 6:39 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] How can I project a Swing components onto a J3D
> > surf ace?
> >
> >
> > I would like to see a 3D user interface.  If you ever get it
> > to work, please
> > send me a link to the applet.
> >
> > Kyle Wayne Kelly
> > Computer Science Student
> > University of New Orleans
> > http://www.cs.uno.edu/~kkelly
> > ----- Original Message -----
> > From: "J. Lee Dixon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 25, 2001 3:16 PM
> > Subject: Re: [JAVA3D] How can I project a Swing components
> > onto a J3D surf
> > ace?
> >
> >
> > > I think it is doable, but you have to get in there and do some work.
> > > For example, you can create an offscreen graphics for a
> > buffered image
> > > to draw upon.  Thus, you should be able to draw the
> > components onto the
> > > offscreen graphic and use it to texture.  When a user
> > clicks on the 3D
> > > object, use the picking routines to figure out where on the
> > object the
> > > pick occurred, convert that to the coordinates of the
> > offscreen graphic,
> > > and then send an event to the correct component.  After
> > that, redraw the
> > > scene onto the offscreen graphic and reapply the texture.
> > >
> > > I do this sort of thing with text displays.  I would think
> > it would be
> > > not too far fetched to tell a JButton that it's parent is something
> > > derived from a BufferedImage.
> > >
> > > I personally just model 3D buttons, sliders, and text
> > displays to make
> > > 3D GUIs, complete with the ability to attach listeners.
> > >
> > > -Lee
> > >
> > > > -----Original Message-----
> > > > From: Yazel, David J. [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, January 25, 2001 10:02 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: [JAVA3D] How can I project a Swing
> > components onto a J3D
> > > > surf ace?
> > > >
> > > >
> > > > I have heard this request before, but I can't even picture
> > > > what this means.
> > > > Do you mean to put a button or some other Swing component
> > > > actually in the 3d
> > > > scene? or do you mean you are placing the component in
> > the same Swing
> > > > container, with the canvas3d underneath the component?
> > > >
> > > > Because you can do neither of these things to  my
> > knowledge.  Swing is
> > > > lightweight and java3d is heavyweight.  The closest I have
> > > > come is to put
> > > > swing components in JWindow's and float them above the
> > > > canvas.  You can, of
> > > > course, build swing apps where the swing controls to the
> > > > left, right, above
> > > > or below the canvas and that will work.  For some things I
> > > > find I have to
> > > > trap the AWT events in the canvas3d and send them back to the
> > > > top of my
> > > > Swing hierarchy to be processed properly (i.e. keystroke events).
> > > >
> > > > Dave Yazel
> > > >
> > > > > ----------
> > > > > From:         Stefan Bühlmann[SMTP:[EMAIL PROTECTED]]
> > > > > Reply To:     Discussion list for Java 3D API
> > > > > Sent:         Thursday, January 25, 2001 4:41 AM
> > > > > To:   [EMAIL PROTECTED]
> > > > > Subject:      [JAVA3D] How can I project a Swing components
> > > > onto a J3D
> > > > > surface?
> > > > >
> > > > > Hello,
> > > > >
> > > > > does anyone know a simple way, to project Swing components
> > > > onto the =
> > > > > surface of a J3D object, such that the mouse is
> > correctly passed =
> > > > > through? E.g. Clicking the mouse clicks on the swing buttons.
> > > > >
> > > > > Thanks for any help, Stefan
> > > > >
> > > > >
> > > >
> > > > ==============================================================
> > > > =============
> > > > 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".
> > > >
> > >
> > >
> > ==============================================================
> > =============
> > > 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".
> > >
> >
> > ==============================================================
> > =============
> > 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".
> >
>
>
===========================================================================
> 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".
>

===========================================================================
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".

Reply via email to