The most efficient thing would be to use the setEnable() method that exists
for each behavior.
Add all three behaviors to the scene and disable them.
Then when one of your buttons is depressed, you enable that behavior.
To be very thorough, since you will have three buttons, when one is
depressed it should enable that behavior, disable the other two behaviors
and change the state of the other buttons so that they are not depressed.
Basically, you need to worry about the conditions of when no buttons have
been pressed and you press one, as well as when one of the buttons has been
depressed and you click on another.
I think that this should be enough help.
At 12:24 PM 01/29/2001 +0000, you wrote:
>Hi..
>
>Forgve me if this is a simple question but I'm really struggling to even
>work how I go about this..
>
>What I would like to do is setup a toolbar on my JFrame and have buttons
>for specifying what the mouse will do when interacting with my 3D scene.
>eg a button to pick, a button to rotate, zoom etc..
>So that the user clicks, say the zoom button, and when the click and drag
>on the 3D scene the scene zooms. If the click the rotate buton then when
>they
>click and drag on the 3D scene then it rotates.. you get the idea.
>
>Writing the mouse behavours themselves is not a problem (ie transforms to
>zoom) but what I'm having great difficulty in is getting the interaction
>between
>by toolbar buttons and the mosue behavours. ie. allowing/passing the toolbar
>button states to the the 3D mouse behaviours.
>
>How on earth do I do this ?
>
>Could someone please explain how I do this in easy steps/layman terms as
>I'm fairly new to Java but understand the basic principles (3D stuff is not
>a problem
>as I know about object manipulations etc) its just how I go about the
>linking of
>toolbar button to mouse behaviour control.
>
>Thanks in advance
>
>Andy Knight
>Software Engineer
>Syngenta
>
>===========================================================================
>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".
***********************************************************************
Eric Reiss
Manager MEMS Lab
Swanson New Product Incubator
School of Engineering - University of Pittsburgh
3700 O'Hara Street
647 Benedum Hall
Pittsburgh, PA 15261
Phone: 412-624-9696
Email: [EMAIL PROTECTED]
http://www.sigda.acm.org/Eric/
***********************************************************************
===========================================================================
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".