« JavaFX Skins Game, and Happy New Year! | Main | Create Widgets in JavaFX with Newly-Released WidgetFX 1.0 »

January 04, 2009

Comments

Jim Weaver

"Thanks James for your concern and helpfull blog !
Short question : what is the DeckNode::backgroundNode purpose ? it is used anywhere :(
What was its forst goal ?
Tahnks,
tibO"

The purpose of the DeckNode::backgroundNode variable is to provide a background for the deck node that is always visible no matter what node is also visible. It can be assigned when the DeckNode is created.

Thanks,
Jim Weaver

pitek71

Thanks James for your concern and helpfull blog !
Short question : what is the DeckNode::backgroundNode purpose ? it is used anywhere :(
What was its forst goal ?
Tahnks,
tibO

Mike

"please let me know how it goes!"

Thanks, Jim. That worked.
The key is "content: bind [ activeScr ]" construction. Where "activeScr" is a reference to different instances of my classes which extends from Group and created in runtime depending on application state.

James Weaver

"Is there a way to change content of the scene in runtime? What I mean is what if you want to create multiple document interface in javaFX. So you would have a bunch of complicated GUI groups created in runtime, and you want to switch between them on your main scene. How do you do that?"

Mike,
Great idea! I haven't tried this, but here's a suggestion. Please let me know if it works or not: Create some instances of Scene that have the desired contents. Bind the scene to the stage in a similar manner to which this DeckNode example binds the visibleNodeRef to the content. For modularity, you may want to have multiple subclasses of Scene. That would have the advantage of being able to introduce a variable, perhaps named "id", that can identify each Scene (in the same manner that I'm using the id variable of Node). Please let me know if you'd like me to clarify, and again, please let me know how it goes!

Thanks,
Jim Weaver

The comments to this entry are closed.

Categories