Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to embed 3D models in web page using JAVA?

843799Aug 2 2001 — edited Aug 22 2001
Hello

I'm doing a project at University to create a virtual tour of a village. I am creating the buildings in MAYA using polygon planes and cubes and then exporting to VRML.

I plan to embed each individual model into a separate web page. Then when the user clicks on a location in a 2D map they will be taken to the web page containing that building.

However, I can't work out how to embed these 3D models into web pages using JAVA. Can anyone help me with this, please?

Also, I've been told to use JAVA 3D to interact with the project but am unclear as to how JAVA 3D would be used in this project - aqny ideas/suggestions welcome!

M.

Comments

Timo Hahn

Vishnu, tell us your jdev version, please!

You should read better describe what you want to do (maybe read https://tompeez.wordpress.com/2016/10/14/how-to-ask-questions-in-otn-spaces/ ).

If you set a child node as selected the parent node doesn't discloses itself, you have to do it yourself. Once all nodes to the child are disclosed, you don't see the 'go to top'. If you know the child node you create a new RowKeySet and add the child node to it. then you traverse the tree up  and add each parent node to the rowKeySet until you reach the root node which you have to add too. This should do it. For an implementation you can look at https://blogs.oracle.com/jdevotnharvest/entry/how_to_programmatically_disclose_a which shows how to implement this.

Timo

Vishnu Chada

Apologize for not putting the question clearly.

I'm using Jdev 11.1.1.7.

Yes, I do understand that I have to traverse through the tree and find respective parents to disclose a particular node.

But my question is regarding setting selected row and not disclosed rows. I'm able to disclose rows as required.

Upon setting selected keys and refreshing the tree, I don't see entire tree but only the selected node. (with a blue arrow as shown in my screenshot)

Is there a way to avoid this behavior, so that the blue arrow doesn't appear and just required row is selected and entire tree is displayed as-is.

-Vishnu

Timo Hahn

Yes,  the blue arrow means that you have set the root node and not selected node.

How have you implemented the selection?

Vishnu Chada

Thanks for the responses, Timo.

I've noticed that it is not because of selected node but because of 'setFocusRowKey()'.

I'm trying to disclose necessary nodes, select a particular row and bring the focus to that row. (automatically scroll to that row)

disclose and select are working fine, but focus is bringing in the blue arrow with 'go to top'.

-Vishnu

Timo Hahn

So is the problem solved?

I made a small test case which is working fine. I can search for a node in a tree and select it.

pastedImage_0.png

My search is for the LocationId. I enter 1200 and on click on select the node is searched the tree and selected

pastedImage_1.png

Timo

Vishnu Chada

Appreciate your interest.

No, problem isn't solved.

It is actually an extension to the example you used. Let's say there are 100s of rows that aren't visible without scroll, and the selected row is somewhere at the bottom. To focus the selected row, I'm using setFocusKey(), which brings in the arrow.

-Vishnu

Morgan Freeman
Answer

Hi Vishnu,

I have used the below code to show the selected row in a table which is not visible. It should be something similar for tree component.

The method gets the current row key from the iterator and makes the table to scroll / brings to the top.

pastedImage_0.png

pastedImage_2.png

Thanks

Morgan.

Marked as Answer by Vishnu Chada · Sep 27 2020
Vishnu Chada

thank you, Morgan. That worked.

Morgan Freeman

Hi Vishnu,

Glad I could be of some help

Cheers

Morgan

1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 19 2001
Added on Aug 2 2001
2 comments
220 views