« Reminder: RIA Exemplar Challenge Deadline is 22-May-2010 | Main | What posts would you like to see about HTML5? »

May 31, 2010

TrackBack

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

Listed below are links to weblogs that reference A JavaFX 1.3 Custom Layout Example:

Comments

Jo Voordeckers

The ID is supposed to be unique in the scenegraph, so I wouldn't use it for this purpose. Dedicated properties as Jonathan suggested would be my choice as well.

charger


Pretty nice post.In any case I’ll be subscribing to your feed and I hope you write again soon! I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts.
http://www.laptop-battery-chargers.com/hp-pavilion-dv9700.html hp dv9700 battery

Account Deleted

Jim,

Great post i was wondering why there is not BorderLayout :P

I tried to modify your 1st example and added a panel in panel. removed the first button and added a panel and id: "top"

in panel i added another BorderLayout with imageview left text center and imageview right. but when i try to run i cant see the top layer in the scene!!! any idea ! i am new to javafx.

William Billingsley

Jonathan,

If I was doing your version, I'd recommend extending CustomNode rather than Container. The reason being that extending Container suggests that the 'content' variable is publicly writable. (Although this is not necessarily true -- if it is bound it is no longer publicly writable -- that can't be discovered until runtime.) Extending CustomNode allows you to only expose the north, south, east, west, and centre variables for writing while children remains private.

If you think about it, however, a BorderLayout is a custom node and not a layout or container -- so that is a more appropriate approach. A BorderLayout cannot contain an unbounded list of content, but only a fixed-size set of sub-nodes in a specific arrangement. (Put 20 nodes into a BorderLayout and what would it do?)

But maybe that's just the "make things describe accurately what they do" pedant in me!

William

The comments to this entry are closed.