Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Add EventListener to a Node/BranchGroup...Generate code by clicking
Hi to everybody!
I have a problem with java 3D... i hope you will be able to help me!
In java 3D i have realized a 3Dworld in which i have put several geometry.Box (they are automaticaly placed).
Each Box has a texture taken from a a dataset of pictures in a directory. (the idea is that the boxes with the textures correspond to a preview of the photo).
What is missing is that when the user click on the box, a new window containing the picture (the same of the texture but bigger and in high resolution) will be opened.
If there were a JButton and not a Geometry.Box i will be able to solve the problem, becouse i will add an ActionListener to the JButton and then i will realize the function implementing the ActionPerformed code. However, i can't find an "ActionListener" or an "EventHandler" to add neither to the Node (the Box with the texture) neither to the BranchGroup (or TransformGroup) the box is referring to.
Can someone help me?
Or does anybody have any idea or suggestions to solve the problem in a different way?
Thanks a lot!
I have a problem with java 3D... i hope you will be able to help me!
In java 3D i have realized a 3Dworld in which i have put several geometry.Box (they are automaticaly placed).
Each Box has a texture taken from a a dataset of pictures in a directory. (the idea is that the boxes with the textures correspond to a preview of the photo).
What is missing is that when the user click on the box, a new window containing the picture (the same of the texture but bigger and in high resolution) will be opened.
If there were a JButton and not a Geometry.Box i will be able to solve the problem, becouse i will add an ActionListener to the JButton and then i will realize the function implementing the ActionPerformed code. However, i can't find an "ActionListener" or an "EventHandler" to add neither to the Node (the Box with the texture) neither to the BranchGroup (or TransformGroup) the box is referring to.
Can someone help me?
Or does anybody have any idea or suggestions to solve the problem in a different way?
Thanks a lot!
Comments
-
You could use pickBehaviors. They are used to click an object and then rotate, zoom,... with mouse. This is documented in chapter 4 of tutorial.
With that you can use a Pickresult. This is a way to get all nodes in the graph you selected. adn then do the job you want on shape3d, tg's,...
If you need further help, tell me. I could give you some working code.
Regards
I hope this will help you
jfp
This discussion has been closed.