Class ObjectProperty<S>

  • Type Parameters:
    S - the type of source object that this Property operates on and therefore the type of value that it represents

    public final class ObjectProperty<S>
    extends Property<S,​S>
    An immutable, read-only, Property implementation whose getValue method returns the source object that it is given. This class is useful when you want to configure a Binding to use its source object directly, rather than some property of the source object. For example:

    
        new SomeBindingClass(sourceObject, ObjectProperty.create(), targetObject, targetProperty);
     

    Explicitly using ObjectProperty isn't necessary when creating Bindings from this package or the SwingBindings package, as the set of static creation methods include versions that handle this for you.

    Author:
    Shannon Hickey