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.

Interview with Ander Ruiz

Interview with Ander Ruiz

Today I have an interview with Ander Ruiz, a developer I’ve been working with on an updated version of Scenic View that will be released next week. The one point I want to raise is that we want your feedback on new features to add to this application! Leave comments in the comments section below. For those of you unfamiliar with Scenic View, there is now a Scenic View page here at FX Experience which will be shortly updated with the new release, but the current release can also be downloaded.

Hi Ander. Could you please introduce yourself to everyone?Ander Ruiz
I’m a graduate of the Engineering School of Bilbao with a Bachelor degree in Telecomunications Engineering. I’ve been working as a software architect at Telvent on Java for embedded environments since 2002 with lots off hardware control, all kind of communications (serial ports, usb, network protocols …), and user interaction.

You’ve mentioned to me previously that you do a lot of work with JavaFX-based kiosks – can you provide mode detail about how you use JavaFX for kiosks?
Our old machines use HTML as their GUI, and an obsolete JNI Wrapper of Mozilla (1.7!!) called JRex for browsing the (there was no WebView at that time :-(). It was not bad, but definitively far from perfect. So in 2008 I started to search for a replacement, and after discounting Flex (which was being used for our server application) I chose JavaFX. Three years later we have an appealing framework to build our GUIs, that reduces our development costs and bugs. And with JavaFX 2.x you have provided me a way to migrate the old GUIs.

(more…)

JavaFX links of the week, May 29

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! šŸ™‚

That’s all for another week. Again, sorry for the delay. See you all again next week! šŸ™‚

ListView, custom cell factories, and context menus

ListView, custom cell factories, and context menus

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…)

JavaFX links of the week, May 21

Welcome to this weeks links roundup. I’ve got plenty of good JavaFX links this week, so enjoy! šŸ™‚

Catch you again next week šŸ™‚

JavaFX links of the week, May 14

JavaFX links of the week, May 14

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 šŸ™‚