S
- type of the source objectE
- type of the elements in the listpublic abstract class ListProperty<S,E> extends Object implements IListProperty<S,E>
Constructor and Description |
---|
ListProperty() |
Modifier and Type | Method and Description |
---|---|
protected List<E> |
doGetList(S source)
Returns a List with the current contents of the source's list property
|
protected void |
doSetList(S source,
List<E> list)
Updates the property on the source with the specified change.
|
protected void |
doUpdateList(S source,
ListDiff<E> diff)
Updates the property on the source with the specified change
|
List<E> |
getList(S source)
By default, this method returns
Collections.EMPTY_LIST in
case the source object is null . |
IObservableFactory<S,IObservableList<E>> |
listFactory()
Returns a factory for creating observable lists tracking this property of
a particular property source.
|
IObservableFactory<S,IObservableList<E>> |
listFactory(Realm realm)
Returns a factory for creating observable lists in the given realm,
tracking this property of a particular property source.
|
IObservableList<E> |
observe(S source)
Returns an observable list observing this list property on the given
property source
|
<U extends S> |
observeDetail(IObservableValue<U> master)
Returns an observable list on the master observable's realm which tracks
this property of the current value of
master . |
void |
setList(S source,
List<E> list)
Updates the property on the source with the specified change
Note: This method is made available to facilitate basic property
access.
|
void |
updateList(S source,
ListDiff<E> diff)
Updates the property on the source with the specified change
Note: This method is made available to facilitate basic property
access.
|
<T> IListProperty<S,T> |
values(IValueProperty<? super E,T> detailValue)
Returns the nested combination of this property and the specified detail
value property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getElementType, observe
public List<E> getList(S source)
Collections.EMPTY_LIST
in
case the source object is null
. Otherwise, this method
delegates to doGetList(Object)
.
Clients may override this method if they e.g. want to return a specific
default list in case the source object is null
.
getList
in interface IListProperty<S,E>
source
- the property source (may be null)doGetList(Object)
protected List<E> doGetList(S source)
source
- the property sourcepublic final void setList(S source, List<E> list)
IListProperty
Note: This method is made available to facilitate basic property
access. However if the property source lacks property change
notification, then observables on the source object may not be notified
of the change. In most cases it is preferable to modify the source
through an IObservableList
than through the property directly.
setList
in interface IListProperty<S,E>
source
- the property source (may be null)list
- the new listprotected void doSetList(S source, List<E> list)
source
- the property sourcelist
- the new listpublic final void updateList(S source, ListDiff<E> diff)
IListProperty
Note: This method is made available to facilitate basic property
access. However if the property source lacks property change
notification, then observables on the source object may not be notified
of the change. In most cases it is preferable to modify the source
through an IObservableList
than through the property directly.
updateList
in interface IListProperty<S,E>
source
- the property source (may be null)diff
- a diff describing the changeprotected void doUpdateList(S source, ListDiff<E> diff)
source
- the property sourcediff
- a diff describing the changepublic IObservableList<E> observe(S source)
IListProperty
observe
in interface IListProperty<S,E>
source
- the property sourcepublic IObservableFactory<S,IObservableList<E>> listFactory()
IListProperty
listFactory
in interface IListProperty<S,E>
public IObservableFactory<S,IObservableList<E>> listFactory(Realm realm)
IListProperty
listFactory
in interface IListProperty<S,E>
realm
- the realmpublic <U extends S> IObservableList<E> observeDetail(IObservableValue<U> master)
IListProperty
master
.observeDetail
in interface IListProperty<S,E>
master
- the master observablemaster
.public final <T> IListProperty<S,T> values(IValueProperty<? super E,T> detailValue)
IListProperty
IObservableList.set(int, Object)
method. Modifications made
through the returned property are delegated to the detail property, using
the corresponding list element from the master property as the source.values
in interface IListProperty<S,E>
detailValue
- the detail property
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.