Given there are also methods to set and get the values of these properties, and the properties themselves are private members, I think it makes sense to wrap these properties in read-only classes when returning them from getter methods.
Examples:
PannableCanvas.scaleProperty
Arrow.startXProperty
Edge.textProperty
In cases where the property should be write-accessible, then the property scope could be public instead of private, though I suppose that does open the member up to reassignment and loss of bindings.
Given there are also methods to set and get the values of these properties, and the properties themselves are
private
members, I think it makes sense to wrap these properties in read-only classes when returning them from getter methods.Examples:
PannableCanvas.scaleProperty
Arrow.startXProperty
Edge.textProperty
In cases where the property should be write-accessible, then the property scope could be
public
instead ofprivate
, though I suppose that does open the member up to reassignment and loss of bindings.