FX Experience Has Gone Read-Only
I've been maintaining FX Experience for a really long time now, and I love hearing from people who enjoy my weekly links roundup. One thing I've noticed recently is that maintaining two sites (FX Experience and JonathanGiles.net) takes more time than ideal, and splits the audience up. Therefore, FX Experience will become read-only for new blog posts, but weekly posts will continue to be published on JonathanGiles.net. If you follow @FXExperience on Twitter, I suggest you also follow @JonathanGiles. This is not the end - just a consolidation of my online presence to make my life a little easier!
tl;dr: Follow me on Twitter and check for the latest news on JonathanGiles.net.
by Richard Bair | Jul 6, 2010 | Tips n' Tricks
One of the annoying sharp edges in JavaFX is around text alignment, especially with regards to the Text node. In this tip, I’m going to skip using the Text node in favor of using the Label control, because it gives you better… uh… control over text placement. This is actually based on a trick I used to use with Swing all the time. If I wanted to center some text in a layout, I’d specify the space I wanted the text positioned within by setting the size of the label to match that space, and then I’d either position the text at the center, top, right, etc.
Using the same trick in JavaFX, I can cause some text to be right positioned. An additional benefit to using the Label control is that if the space isn’t big enough for the text, it can be elided using the textOverrun variable.
Label {
width: bind 120
text: "Right Positioned Message!"
font: Font { size: 10 }
textFill: Color.BLACK
hpos: HPos.RIGHT
}
Anyway, it ain’t perfect but a good trick for the moment.
by Jonathan Giles | Jul 4, 2010 | Links
Wow, July already. Time sure is flying these days. As always, please feel free to flick me an email or a tweet to let me know of any news you want included. Let’s get on with the news!
- Tor Norbye blogged about not using implicit return types in public API declarations in JavaFX, and from my perspective, copped quite an unfair bashing for doing so. He also provided a NetBeans plugin for identifying this issue, and ‘quick fixing’ it. As for the comments on the post: I personally love implicit typing, but not when it is public API, for the reasons Tor identifies. It would suck to have to type :Void for every function and specify the type of all parameters in an overridden function. The language really isn’t broken.
- The Exadel JavaFX Plugin for Eclipse has been upgraded to 1.3.3. In addition to this they’ve blogged about the new ‘go to member’ feature added in 1.3.3.
- Johannes Schneider has announced that he has added his JavaFX2Java bridge to the JFXtras project (in a separate cloned repo). You can find out more about this bridge in another blog posting.
- The Oracle Technical Network interviewed John Jullion-Ceccarelli and Martin Ryzl, two of the managers behind NetBeans 6.9. They discussed the new NetBeans Composer tool for rapid JavaFX application development.
- Srikanth Shenoy has blogged about ‘Effective JavaFX Architecture‘. This is the first part of a series of posts he is promising to do.
- Eviware popped out of nowhere this week with their loadUI application for load-testing webapps. They’ve posted some videos and in general their app, built using JavaFX and Groovy, looks really impressive.
- Oracle announced that JavaFX is powering the Major League Baseball ‘fantasy baseball’ applications, although I haven’t yet seen it in action because I don’t live in the US or Canada (but you can go here to sign up, and presumably play).
That’s it for another week folks. Catch you in a weeks time.