Top Description Constructors Methods
javafx.beans.property

public abstract Class ReadOnlyListProperty<E>

extends ListExpression<E>
implements ReadOnlyProperty<ObservableList<E>>
Class Inheritance
All Implemented Interfaces
javafx.beans.property.ReadOnlyProperty, javafx.beans.value.ObservableValue, javafx.beans.Observable
Known Direct Subclasses
javafx.beans.property.ReadOnlyListPropertyBase, javafx.beans.property.ListProperty
Type Parameters
<E>
the type of the List elements
Imports
java.util.List, .ListIterator, .Objects, javafx.beans.binding.Bindings, .ListExpression, javafx.collections.ObservableList

Superclass for all readonly properties wrapping an javafx.collections.ObservableList.
Since
JavaFX 2.1
See Also
javafx.collections.ObservableList, javafx.beans.value.ObservableListValue, javafx.beans.binding.ListExpression, ReadOnlyProperty

Constructor Summary

AccessConstructor and Description
public
ReadOnlyListProperty()

The constructor of ReadOnlyListProperty.

Method Summary

Modifier and TypeMethod and Description
public void
bindContent(ObservableList<E>
the ObservableList this property should be bound to
list
)

Creates a content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another ObservableList.

public void
bindContentBidirectional(ObservableList<E>
the ObservableList this property should be bound to
list
)

Creates a bidirectional content binding of the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another ObservableList.

public boolean
equals(Object
the object to be compared for equality with this list
obj
)

Overrides java.lang.Object.equals.

Implements java.util.List.equals.

Compares the specified object with this list for equality.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.List.hashCode.

Returns the hash code value for this list.

public String

Returns:

a string representation of this ReadOnlyListProperty object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this ReadOnlyListProperty object.

public void
unbindContent(Object
the Object to which the binding should be removed
object
)

Deletes a content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another Object.

public void
unbindContentBidirectional(Object
the Object to which the bidirectional binding should be removed
object
)

Deletes a bidirectional content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another Object.

Inherited from javafx.beans.binding.ListExpression:
addaddaddAlladdAlladdAllasStringclearcontainscontainsAllemptyPropertygetgetSizegetValueindexOfisEmptyisEqualToisNotEqualToisNotNullisNulliteratorlastIndexOflistExpressionlistIteratorlistIteratorremoveremoveremoveremoveAllremoveAllretainAllretainAllsetsetAllsetAllsizesizePropertysubListtoArraytoArrayvalueAtvalueAt

Constructor Detail

ReadOnlyListPropertyback to summary
public ReadOnlyListProperty()

The constructor of ReadOnlyListProperty.

Method Detail

bindContentback to summary
public void bindContent(ObservableList<E> list)

Creates a content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another ObservableList.

A content binding ensures that the content of the wrapped ObservableLists is the same as that of the other list. If the content of the other list changes, the wrapped list will be updated automatically. Once the wrapped list is bound to another list, you must not change it directly.

Parameters
list:ObservableList<E>

the ObservableList this property should be bound to

Exceptions
NullPointerException:
if list is null
IllegalArgumentException:
if list is the same list that this ReadOnlyListProperty points to
bindContentBidirectionalback to summary
public void bindContentBidirectional(ObservableList<E> list)

Creates a bidirectional content binding of the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another ObservableList.

A bidirectional content binding ensures that the content of two ObservableLists is the same. If the content of one of the lists changes, the other one will be updated automatically.

Parameters
list:ObservableList<E>

the ObservableList this property should be bound to

Exceptions
NullPointerException:
if list is null
IllegalArgumentException:
if list is the same list that this ReadOnlyListProperty points to
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Implements java.util.List.equals.

Doc from java.util.List.equals.

Compares the specified object with this list for equality. Returns true if and only if the specified object is also a list, both lists have the same size, and all corresponding pairs of elements in the two lists are equal. (Two elements e1 and e2 are equal if Objects.equals(e1, e2).) In other words, two lists are defined to be equal if they contain the same elements in the same order. This definition ensures that the equals method works properly across different implementations of the List interface.

Parameters
obj:Object

the object to be compared for equality with this list

Returns:boolean

true if the specified object is equal to this list

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements java.util.List.hashCode.

Doc from java.util.List.hashCode.

Returns the hash code value for this list. The hash code of a list is defined to be the result of the following calculation:

int hashCode = 1;
    for (E e : list)
        hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
This ensures that list1.equals(list2) implies that list1.hashCode()==list2.hashCode() for any two lists, list1 and list2, as required by the general contract of Object#hashCode.
Returns:int

the hash code value for this list

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this ReadOnlyListProperty object.

Returns:String

a string representation of this ReadOnlyListProperty object.

Annotations
@Override
unbindContentback to summary
public void unbindContent(Object object)

Deletes a content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another Object.

Parameters
object:Object

the Object to which the binding should be removed

Exceptions
NullPointerException:
if object is null
IllegalArgumentException:
if object is the same list that this ReadOnlyListProperty points to
unbindContentBidirectionalback to summary
public void unbindContentBidirectional(Object object)

Deletes a bidirectional content binding between the javafx.collections.ObservableList, that is wrapped in this ReadOnlyListProperty, and another Object.

Parameters
object:Object

the Object to which the bidirectional binding should be removed

Exceptions
NullPointerException:
if object is null
IllegalArgumentException:
if object is the same list that this ReadOnlyListProperty points to