List of JavaFX Simple Properties



This site utilizes Google Analytics, Google AdSense, as well as participates in affiliate partnerships with various companies including Amazon. Please view the privacy policy for more details.

I’ve been playing around with JavaFX (the desktop/windows application interface for Java) recently and was trying to find a list of the different “Simple...Property” to use in TableColumn’s setCellValueFactory() method.

Although I wasn’t able to find a list via a Google search, I was able to find at least one Simple…Property. The best list I could find was on the package page for javafx.beans.property (which is the package that these property classes belong). There are ten such properties:

These cover five of the eight primitives in Java (the five included are int, long, float, and boolean, while the missing three are byte, short, and char). A couple properties I feel are missing as well include “SimpleDateProperty” and “SimpleImageProperty,” although these could be implemented by using SimpleObjectProperty.

Finally, an interesting observation about using SimpleDoubleProperty, SimpleFloatProperty, SimpleIntegerProperty, and SimpleLongProperty is that they all implement Property<Number>, not Property<Double>, Property<Integer>, etc. That means one would have to use a TableColumn<S, Number> rather than the respective wrapper class.

Leave a Reply

Note that comments won't appear until approved.