Controls with Values [was Possible additions to JavaFX to facilitate forms and validations]
Knut Arne Vedaa
knut.arne.vedaa at broadpark.no
Tue Dec 6 13:41:07 PST 2011
On 06.12.2011 18:02, Richard Bair wrote:
> Oh, you probably gave the idea to me sub-consciously :-)
Great minds think alike. :)
> From a naming perspective, the idea that TextField would implement property seems wrong, although the idea of binding a TextField to something directly seems great (we had similar API in SwingLabs back in the day for a set of data-aware components I was experimenting with). It takes thinking of a Control a little differently -- in addition to being a thing with a bunch of state, it is also, fundamentally, used for displaying and editing a value. It still wouldn't be what we would call a "Property" in the meaning of the word, but the Property interface does express the API that could be useful in this context.
What about a new interface Bindable (or BindableValue) that has the
methods that Property has now (all the binding methods):
interface Bindable<T> extends ObservableValue<T>, WritableValue<T>
interface Property<T> extends ReadOnlyProperty<T>, Bindable<T>
abstract class ValueControl<T> extends Control implements Bindable<T>
Knut Arne
More information about the openjfx-dev
mailing list