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 Jonathan Giles | May 28, 2012 | Links
Hi all! Sorry for the delayed post this week – I have just moved to a new house (just outside of Palmerston North, New Zealand), and didn’t have internet access. Now that things are starting to get back to normal (and my internet is thankfully restored), I’ve got a bunch of links for your reading pleasure. Enjoy! π
- As per usual, new developer preview builds of JavaFX 2.2 and Scene Builder 1.0 have been released.
- Along with the updated developer preview builds, the documentation team has also released updated Scene Builder documentation.
- I wrote a post here at FX Experience regarding how to show context menus when using a custom cell factory in ListView/TreeView/TableView controls.
- Gregg Setzer has started an open source project to create native looks for JavaFX applications. He has started off by developing a Windows 8 CSS file. I would love to see more people join this project and develop a number of CSS files for various operating system releases. If you’re interested, Greg is watching the thread of this post for any comments.
- Anton Epple has posted a comparison between the Scenic View application released a few weeks ago and the NetBeans Graphical UI Debugger. I will note that Scenic View is about to see another release, with a huge number of features added including live editing, searching (class name, node id and property name), and much, much more. However, there are of course things that Scenic View will likely never do, including integrating with the source code, so there is certainly value in getting to know both tools.
- Gerrit Grunwald has blogged about using the new Canvas API in the JavaFX 2.2 developer preview builds.
- Jim Weaver has posted part two of his ‘Best Practices for JavaFX 2 Enterprise Applications‘ series.
- Carl Dea wrote part three of his JavaFX 2 game tutorial.
- Thierry Wasyl has put up part four and part five of his TweetWallFX blog series. These posts cover using the JavaFX charting API, and pulling the whole project together. He has also put up a screencast demonstrating some of the more recent features.
- Amol Hingmire has posted about JavaFX 2.x development using FXML.
- Zoran Pavlovic has two posts this week. Firstly, he introduces how to style JavaFX buttons using CSS, and secondly he introduces the JavaFX ListView control.
That’s all for another week. Again, sorry for the delay. See you all again next week! π
by Jonathan Giles | May 20, 2012 | Controls, Tips n' Tricks
One question I see occasionally is people asking how to go about using prebuilt cell factories (such as those provided in the DataFX project run by Johan Vos and I, those sitting in the OpenJFX 2.2 repo in the javafx.scene.control.cell package, or just those that they have created internally), and also show a context menu when the user right clicks. More generally, the problem is that cell factories are blackboxes, and there is no support for chaining cell factories together (or even getting hold of the cells as they are being used).
The answer is quite simple: wrap the cell factory inside another cell factory, and set the ContextMenu on the wrapping cell. In other words, you would write code such as this (for ListView):
// The cell factory you actually want to use to render the cell
Callback<ListView<T>, ListCell<T> wrappedCellFactory = ...;
// The wrapping cell factory that will set the context menu onto the wrapped cell
Callback<ListView<T>, ListCell<T> cellFactory = new Callback<ListView<T>, ListCell<T>>() {
@Override public ListCell<T> call(ListView<T> listView) {
ListCell<T> cell = wrappedCellFactory == null ? new DefaultListCell<T>() : wrappedCellFactory.call(listView);
cell.setContextMenu(contextMenu);
return cell;
}
};
// Creating a ListView and setting the cell factory on it
ListView<T> listView = new ListView<T>();
listView.setCellFactory(cellFactory);
(more…)
by Jonathan Giles | May 20, 2012 | Links
Welcome to this weeks links roundup. I’ve got plenty of good JavaFX links this week, so enjoy! π
- JavaFX 2.2 build 8, and Scene Builder 1.0 build 38 are now available for download for testing.
- If you’re new to Scene Builder, check out the developer preview of the ‘getting started with JavaFX Scene Builder‘.
- Eric Bruno has an article up on Dr. Dobbs about the Scene Builder application that was recently made available as a developer preview.
- Patrick Martin has been very busy working on a new tool called Data Explorer, or Dex for short. This tool allows for data import and visualisation, and looks like it has huge potential. Check out the link, if even just for the screenshots (many of which use external non-JavaFX libraries).
- Gerrit Grunwald has blogged about exporting content from Adobe Fireworks CS6, and using the content in JavaFX (by copying the provided SVG, and slightly modifying the provided CSS).
- For those that couldn’t attend Stephen Chin’s talks at JustJava Brazil, he has now posted the translated slide decks online for you to check out.
- Thierry Wasyl has put up part two and three of his posts on his TweetWallFX application. Part two covers the creation of the business objects and use of FXML and controller classes, whilst part three covers transitions and animations, as well as tips on using the FXMLLoader class.
- Anton Epple continues to refine his JavaFX pinball game, adding features such as ball tracking (that is, zooming in and translating the view to follow the ball around the screen) and custom pinball node renderers. He also demonstrates the improved NetBeans support for Scene Builder that is coming in NetBeans 7.2.
- Will Hoover has posted sample code to create dialogs in JavaFX.
- Thomas Bolz has posted an applet version of his SudokuFX application which you can play online.
- Mark Anro Silva has posted code online to show how easy it is to create a loading indicator in JavaFX.
Catch you again next week π
by Jonathan Giles | May 13, 2012 | Links, Scenic View
Hi all. Sorry about the lack of a post last week – I just got back from JavaOne India and was overloaded with work which I had to catch up on. However, I was collecting links all last week as well, and there are now a heap of good links to read through this week! π Enjoy!
Scenic View Sneak-peak
Finally, here is the current, in-development version of Scenic View that I am working on with Ander Ruiz. I will release an updated version of Scenic View as soon as all the features are in place.
That’s that for another week. Catch you all next week π
by Jonathan Giles | May 6, 2012 | General, Layout, Scenic View, UI Design
Update: More recent releases of Scenic View have been released since this post! Go to the Scenic View page to download the latest release!
Developing user interfaces is tricky, regardless of whether you’re just trying to understand the high level scenegraph layout, or whether you’re pushing pixels for a finely tuned user interface. I understand and feel for people in this situation. UI developers come up with all kinds of tricks, for example, temporarily introducing a bold one pixel border of varying colours around components to better understand the user interface. I certainly know I have done that countless times in the past when building user interfaces, and frankly, it is painful and massively time consuming.
Inside the JavaFX team, since times of yore (that is, since at least JavaFX 1.3, but perhaps earlier – my memory fails me here), we’ve had this remarkable little tool that was called Scenic View. It somehow just burst into existence, through the brilliance of Amy Fowler, whom many should know as the layout guru for both Swing and JavaFX. Scenic View is a tool that can be called to browse a live view of the application scenegraph. Here’s a screenshot:
(more…)
by Jonathan Giles | Apr 29, 2012 | Links
Hi all. The links for this week are up a day early because I have an early flight to catch tomorrow on my way to JavaOne Hyderabad. Conversely, next weeks links will be a day or three late as I will be traveling back home. Therefore, I think everything balances out π Let’s get on with the links.
Oh – by the way – if you’re at JavaOne Hyderabad next week and you spot me, come up and say hello. I really love chatting to people, but I can’t pick the JavaFX fans from the Java EE people….and I have nothing to say to Java EE people π
Catch you all next week! π
by Jonathan Giles | Apr 27, 2012 | News
JavaFX 2.1 was released yesterday right on schedule, along with the JavaFX 2.1 release notes, and a huge number of new articles on the JavaFX documentation site. From the Oracle press release, here are the key improvements in JavaFX 2.1 (aside from fixing a whole heap of bugs):
- Available for Windows and Mac OS X (with Linux support currently as preview release) (See also Henrik Stahl’s blog on Mac OS)
- Includes playback of MPEG-4 multimedia containing H.264/AVC video and AAC audio
- New WebView support for JavaScript to Java method calls, which enables JavaScript content to leverage Java for demanding operations
- Support for enhanced font rendering on LCD displays, including sub-pixel rendering
- Additional UI enhancements such as combo box, stacked chart, and application-wide menu bar
- Bundled with the Java 7u4 release
- Oracle has started the OpenJFX project in OpenJDK as part of the plan to open source JavaFX
Now – onward with JavaFX 2.2!
by Jonathan Giles | Apr 24, 2012 | Interviews
It’s been a busy few weeks for me with JavaOne Japan in early April, a heap of development work on JavaFX 2.2, and JavaOne India coming up next week. I’ve slightly dropped the ball on interviews during all of this, but here is another interview from a member of the JavaFX team at Oracle. Peter Zhelezniakov is an engineer in the WebView team, where he works on WebView-related JavaFX APIs all the way down to working with the Webkit code that WebView uses under the covers. Enjoy – and feel free to ask WebView related questions here – I’m sure Peter will be happy to help. π
Hi Peter – thanks for offering to be interviewed. Could you please introduce yourself?
I came to the JavaFX team from Swing, where I was working mostly on Look-and-Feels, but also on Swing’s own HTML package.
So you work on the WebView feature of JavaFX. This is a major component of the new JavaFX 2 series of releases – could you please give an overview of what exactly WebView is?
WebView is a JavaFX node used to display Web pages, with the help of the underlying WebEngine object. It is basically a browser component with a richer programming interface: you can for example examine structure of a page, inject arbitrary scripts, or listen to HTML events. Internally it is a Java wrapper around the Webkit open browser engine used by many desktop and mobile browsers.
(more…)
by Jonathan Giles | Apr 22, 2012 | Links
Welcome to this weeks links roundup. I hope you all find something useful or interesting π
That’s all for this week. Feel free to send me a link if you think you’ve done something that your peers may be interested in. Catch you all next week π
by Jonathan Giles | Apr 15, 2012 | Links
Hey everyone – I’m back in the chair this week having just returned from Japan where I presented at JavaOne and then took a vacation. Thanks to Carl Dea for stepping in for me the last two weeks to keep the links flowing, and for also finding a bunch of links for this weeks post. I apologise if your link has been missed (please let me know), and I also apologise if I repeat a link that has already been posted. With that, let’s get into the links! π
Catch you all next week! π