Top Description Constructors Methods
javafx.beans.property

public abstract Class SetProperty<E>

extends ReadOnlySetProperty<E>
implements Property<ObservableSet<E>>, WritableSetValue<E>
Class Inheritance
All Implemented Interfaces
javafx.beans.value.WritableSetValue, javafx.collections.ObservableSet, javafx.beans.Observable, java.util.Set, java.util.Collection, java.lang.Iterable, javafx.beans.value.WritableObjectValue, javafx.beans.value.WritableValue, javafx.beans.property.Property, javafx.beans.property.ReadOnlyProperty, javafx.beans.value.ObservableValue
Known Direct Subclasses
javafx.beans.property.SetPropertyBase
Type Parameters
<E>
the type of the Set elements
Imports
javafx.beans.binding.Bindings, javafx.beans.value.WritableSetValue, javafx.collections.ObservableSet

This class provides a full implementation of a Property wrapping an javafx.collections.ObservableSet. The value of a SetProperty can be get and set with get(), getValue(), set(Object), and setValue(ObservableSet). A property can be bound and unbound unidirectional with bind(javafx.beans.value.ObservableValue) and unbind(). Bidirectional bindings can be created and removed with bindBidirectional(Property) and unbindBidirectional(Property). The context of a SetProperty can be read with getBean() and getName().
Since
JavaFX 2.1
See Also
javafx.collections.ObservableSet, javafx.beans.value.ObservableSetValue, javafx.beans.value.WritableSetValue, ReadOnlySetProperty, Property

Constructor Summary

AccessConstructor and Description
public
SetProperty()

Creates a default SetProperty.

Method Summary

Modifier and TypeMethod and Description
public void
bindBidirectional(Property<ObservableSet<E>>
the other Property
other
)

Implements javafx.beans.property.Property.bindBidirectional.

Create a bidirectional binding between this Property and another one.

public void
setValue(ObservableSet<E>
The new value
v
)

Implements javafx.beans.value.WritableValue.setValue.

Set the wrapped value.

public String

Returns:

a string representation of this SetProperty object.
toString
()

Overrides javafx.beans.property.ReadOnlySetProperty.toString.

Returns a string representation of this SetProperty object.

public void
unbindBidirectional(Property<ObservableSet<E>>
the other Property
other
)

Implements javafx.beans.property.Property.unbindBidirectional.

Removes a bidirectional binding between this Property and another one.

Inherited from javafx.beans.property.ReadOnlySetProperty:
bindContentbindContentBidirectionalequalshashCodeunbindContentunbindContentBidirectional

Constructor Detail

SetPropertyback to summary
public SetProperty()

Creates a default SetProperty.

Method Detail

bindBidirectionalback to summary
public void bindBidirectional(Property<ObservableSet<E>> other)

Implements javafx.beans.property.Property.bindBidirectional.

Doc from javafx.beans.property.Property.bindBidirectional.

Create a bidirectional binding between this Property and another one. Bidirectional bindings exists independently of unidirectional bindings. So it is possible to add unidirectional binding to a property with bidirectional binding and vice-versa. However, this practice is discouraged.

It is possible to have multiple bidirectional bindings of one Property.

JavaFX bidirectional binding implementation use weak listeners. This means bidirectional binding does not prevent properties from being garbage collected.

Parameters
other:Property<ObservableSet<E>>

the other Property

Annotations
@Override
setValueback to summary
public void setValue(ObservableSet<E> v)

Implements javafx.beans.value.WritableValue.setValue.

Doc from javafx.beans.value.WritableValue.setValue.

Set the wrapped value.

Parameters
v:ObservableSet<E>

The new value

Annotations
@Override
toStringback to summary
public String toString()

Overrides javafx.beans.property.ReadOnlySetProperty.toString.

Returns a string representation of this SetProperty object.

Returns:String

a string representation of this SetProperty object.

Annotations
@Override
unbindBidirectionalback to summary
public void unbindBidirectional(Property<ObservableSet<E>> other)

Implements javafx.beans.property.Property.unbindBidirectional.

Doc from javafx.beans.property.Property.unbindBidirectional.

Removes a bidirectional binding between this Property and another one. If no bidirectional binding between the properties exists, calling this method has no effect. It is possible to unbind by a call on the second property. This code will work:

    property1.bindBidirectional(property2);
    property2.unbindBidirectional(property1);
Parameters
other:Property<ObservableSet<E>>

the other Property

Annotations
@Override