« Mighty Mouse Handling in JavaFX Script: Examples by Sven | Main | Getting Decked: Another JavaFX Custom Node »

July 23, 2008

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54f133d69883400e553b3c03f8833

Listed below are links to weblogs that reference Rolling Your Own JavaFX "Custom Nodes": A Graphical Menu Example:

Comments

Corinne

Thx a lot for this nice menu node it's really great. But maybee you can answer me a question, I'm using JavaFX 1.2 and the command
Timeline {
toggle: true
...

toogle doesn't exists anymore? Do you have any idea what I can use instead?

Thx
greetz

Betsson08

Very nice article. I'm all agree with you.

Betsson

I'm fan of JavaFX. I developed some custom nodes and will publish them in very near future. MenuNode is alo fantastic.

Also please add Linux support ASAP ;) Linux systems are getting more users day by day.

Jim Weaver

Ram,

The images for this article can be downloaded from the following location:
http://jmentor.com/JFX/MenuNodeExample/menu_node_example_assets.zip

That is a zip file that you can expand in the project's classpath.

Ram

Hello James,
Very nice article. Where are the images located that are used in this example? I am learning JavaFx and love to try your example.

Thanks,
Ram

Jim Weaver

Thanks Raj!

Raj

Hi James,

It look really nice. I am visiting your web site for first time and i found very informative. i need to start reading your articles from back :) hope i must not loose a single article.

You write really nice and covers nice topics, please keep going. i be one of your regular reader from now :)

Cheers!!!
Raj

Jim Weaver

Jason Young wrote: "Hi Jim, thanks for the nice example! I've been reading your blog for awhile now.
For your custom node library, I think it would be a great idea to look to the Flex component library to get ideas about what gaps there are in FX base library. Just my 2 cents after working a little with both.
Something simple like their TileList may be a good thing to try to duplicate with FX."

Jason,
Thanks, I'll do that!
Jim Weaver

Jim Weaver

Bernard wrote: "Nice article. One question though: why is it preferred to use nodes rather than components? Is it because they are lighter weight? Could you please give me a link with more info on this topic?"

and karenpp wrote: "Does making it a node make it easier to skin than a component? If you're considering blog posts, may I suggest skinning? It is a major part of the other RIA platforms but I haven't seen much on it for JavaFX yet.. maybe because most controls are components and not nodes so far?"

I'm glad you both brought this up. The fact that JavaFX started out with components and nodes is because of Java's Swing and Java2D history. Working with these two "worlds" in the same language forces the developer to use adapters from one world to the other. For example, if you have some sort of container Component (say, a BorderPanel), and you want to draw in it, you have to place a Canvas in it and draw on the Canvas. Conversely, if you have a Canvas, and want to place a Swing component on it, you have to use a class (View in Java, ComponentView in JavaFX). The approach that I, and others, advocated was to make everything a node. Even layouts would be nodes, and would contain nodes. Currently, the JavaFX team is aggressively creating a set of skinnable UI controls that use CSS for styling. Here's a thread from the JavaFX GUI mailing list that discusses the first few node-based controls to be created. Meanwhile, of course, you can use the components in the javafx.ext.swing package.

https://openjfx-compiler.dev.java.net/servlets/ReadMsg?listName=gui&msgNo=493

Thanks, and please let me know if you have any more feedback or questions!
Jim Weaver

karenpp

Does making it a node make it easier to skin than a component? If you're considering blog posts, may I suggest skinning? It is a major part of the other RIA platforms but I haven't seen much on it for JavaFX yet.. maybe because most controls are components and not nodes so far?

Bernard Kushfing Zoopla

Hi James,

Nice article. One question though: why is it preferred to use nodes rather than components? Is it because they are lighter weight? Could you please give me a link with more info on this topic?

Cheers,
Bernard

Jason Young

Hi Jim, thanks for the nice example! I've been reading your blog for awhile now.

For your custom node library, I think it would be a great idea to look to the Flex component library to get ideas about what gaps there are in FX base library. Just my 2 cents after working a little with both.

Something simple like their TileList may be a good thing to try to duplicate with FX.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

About/Contact


  • About this blog, and
    how to contact me

VNI Media is a JavaFX Solution Provider


  • As a JavaFX Preferred Solution Provider, we'd be honored to help you with your JavaFX/Java development needs.

JavaFXpert RIA Exemplar Challenge - Win 2000 USD!


  • Create an application in JavaFX that exemplifies the appearance and behavior of a next-generation enterprise RIA (rich internet application).
    Are you up to the challenge?

Upcoming Speaking Engagements:

Pro JavaFX 1.2 Book


  • Written by Jim Weaver, Weiqi Gao, Stephen Chin, and Dean Iverson as a definitive guide to JavaFX and for temporary relief from insomnia. ;-)

Stay up to speed

Upcoming JavaFX Training:

Enter your email address:

Delivered by FeedBurner

Twitter Updates

    follow me on Twitter

    Affiliations:

    December 2009

    Sun Mon Tue Wed Thu Fri Sat
        1 2 3 4 5
    6 7 8 9 10 11 12
    13 14 15 16 17 18 19
    20 21 22 23 24 25 26
    27 28 29 30 31    

    Disclaimer:

    • Java, the coffee cup logo, and all Java based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. or other countries.
    • By reading this site, you are agreeing that under no circumstances will Veriana Networks, Inc. or its affiliates be responsible for (1) any information contained on or omitted from the site, (2) any person's reliance on any such information, whether or not the information is correct, current or complete, (3) the consequences of any action you or any other person takes or fails to take, whether or not based on information provided by or as a result of the use of the sites.