hey,
i've a problem using JRViewer in my RichClient Application. I got so far extracting the viewingComponent and adding it to my View. During initializing my panel, i create a sceneGraphComponent without any children and set it as content for my viewer.
now i need to add children during runtime to the rootComponent. This works fine as well, but the viewer does not update itself. So i can't see the new components in my application.
I tried to repaint the viewingComponent to force an update, but this didn't work either and the viewer itself has no update() method.
setting a sceneGraphComponent which already has children as content before startup works fine. but this is not what i need, i need to be able to change the scenegraph during runtime and the view need to by synchronal with the scenegraph.
Well, sorry for possible lacks of explanation. Hope, someone can offer a suggestion.
Best regards,
gorgm
Updating ViewingComponent
Re: Updating ViewingComponent
Hi, you need to call the render method on the Viewer. How did you create the panel?
Re: Updating ViewingComponent
Sorry, I just saw you are using JRViewer. So, here is how you obtain the viewer: Then you can call whenever your scene has changed.
But it looks strange that the rendering isn't done automatically whenever you modify the scene. Can you give more details on your setup, what -D... parameters do you pass and how do you configure the JRViewer?
Code: Select all
JRViewer jrv = ...;
// configure jrv
panel = jrv.startupLocal();
Viewer v = jrv.getPlugin(View.class).getViewer();
Code: Select all
v.render()
But it looks strange that the rendering isn't done automatically whenever you modify the scene. Can you give more details on your setup, what -D... parameters do you pass and how do you configure the JRViewer?
Re: Updating ViewingComponent
hey, thanks for the quick answer.
everything works fine. you are right, the viewer updates itself.
I just didn't thought of encompassing. So everything got displayed, but i couldn't see it, because i wasn't encompassed.
So hope this won't happen again.
thanks
gorgm
everything works fine. you are right, the viewer updates itself.
I just didn't thought of encompassing. So everything got displayed, but i couldn't see it, because i wasn't encompassed.
So hope this won't happen again.
thanks
gorgm