Skip to main content

Properties

Guide To the Observable Classes - Part III

You can work with a JavaFX for a long time before you realize that ListProperty is even a thing. And when you do, you’ll probably be extremely confused by it. That’s because ListProperty (and all of the other types that descend from ObservableValue<List>) implements all of the methods of ObservableList as well as everything implied by ObservableValue and its descendants. This is a little mind boggling, because ObservableList<T> is generic itself, and implements everything in List<T>, and this means that ListProperty<T> does everything that Property<T> does, as well as everything that ObservableList<T> and, therefore, List<T> does. But don’t worry, read this and it will all make sense - and actually be really useful.

Guide To the Observable Classes - Part II

This article is about the all of the typed observable classes and interfaces except the ones concerned with List. You’ll find that all of the relationships and structure found in the generic classes is just about exactly the same, but then there are a few extra classes and interfaces added to the hierarchy depending on the type of data that they hold. We’ll concentrate mostly on two types, String and Integer here, because dealing with the others would just be redundant. String is typical of stand-alone types, and Integer is typical of types that are included in Number.

Guide To the Observable Classes - Part I

The place to start looking at the Observable types is with the generic classes and interfaces. These are the observable wrappers that you can use around any other class of object. More importantly, the hierarchy here is exactly the same as the hierarchy that is used for all of the typed observables. If you can understand how generic observable classes and interfaces relate to each other, without worrying about what kind of data is inside them, and special classes added to handle those types, then you’ll automatically be able to understand how they work when they are typed.