|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.DataObjectView
public class DataObjectView
Creates a dynamically sortable, filterable list view of a data object. The list view is itself a data object: The properties of this object are integer indexes. The source object is usually a collection type object such as a registry but can be any IDataObject.
DataObjectFilter
Field Summary |
---|
Fields inherited from class dsto.dfc.databeans.AbstractDataObject |
---|
listeners |
Fields inherited from interface dsto.dfc.databeans.IDataObject |
---|
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE |
Constructor Summary | |
---|---|
DataObjectView(IDataObject source)
|
|
DataObjectView(IDataObject source,
IFilter filter)
|
|
DataObjectView(IDataObject source,
IFilter filter,
ISorter sorter)
Create a new instance. |
|
DataObjectView(IDataObject source,
IFilterSorter filterSorter)
Shortcut to create a new instance with a combined filter/sorter. |
|
DataObjectView(IDataObject source,
ISorter sorter)
|
Method Summary | ||
---|---|---|
void |
childPropertyChanged(Object notUsed,
PropertyEvent e)
Invoked when a child property value has changed. |
|
static
|
defaultSorter()
Create a default sorter. |
|
void |
dispose()
Dispose of the object (unregister listeners, close open resources etc). |
|
IFilter |
getFilter()
|
|
TypeInfo |
getTypeInfo()
Get the optional type information for this object. |
|
Object |
getValue(int index)
|
|
Object |
getValue(Object name)
Get the value of a given property. |
|
int |
indexOf(Object value)
The sorted index of value in the view (-1 if value is not shown in the view). |
|
boolean |
isTransient(Object name)
Test a property is transient (ie will not be preserved if the object is saved). |
|
Iterator |
iterator()
|
|
Iterator |
propertyIterator()
Get an iterator that scans over all currently defined properties. |
|
void |
propertyValueChanged(PropertyEvent e)
|
|
void |
refilter()
Force the view to refilter its contents. |
|
void |
setFilter(IFilter newFilter)
Set the view filter. |
|
void |
setValue(Object name,
Object value,
int mode)
Set the value of a given property. |
|
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataObjectView(IDataObject source)
public DataObjectView(IDataObject source, IFilterSorter filterSorter)
source
- The source object to read from.filterSorter
- Combined filter sorter.public DataObjectView(IDataObject source, IFilter filter)
public DataObjectView(IDataObject source, ISorter sorter)
public DataObjectView(IDataObject source, IFilter filter, ISorter sorter)
source
- The source object to read from.filter
- Any values of source that are included by the
fliter appear in this view. May be null for no
filtering.sorter
- Values in the view are kept sorted using this. May
be null for default sorting.Method Detail |
---|
public static final <T> ISorter<T> defaultSorter()
ISorter.DEFAULT_SORTER
public void dispose()
Disposable
dispose
in interface Disposable
public void setFilter(IFilter newFilter)
public IFilter getFilter()
public void refilter()
public void propertyValueChanged(PropertyEvent e)
propertyValueChanged
in interface PropertyListener
public void childPropertyChanged(Object notUsed, PropertyEvent e)
AbstractDataObject
childPropertyChanged
in interface IDataObjectChildListener
childPropertyChanged
in class AbstractDataObject
notUsed
- The property name on this object that the child
is accessible by.e
- The change event from the child.AbstractDataObject.registerValue(Object, Object)
public TypeInfo getTypeInfo()
IDataObject
getTypeInfo
in interface IDataObject
getTypeInfo
in class AbstractDataObject
TypeRegistry
public void setValue(Object name, Object value, int mode)
IDataObject
setValue
in interface IDataObject
setValue
in class AbstractDataObject
name
- A property name.value
- The new value. On most objects using null removes
the property.mode
- The mode for the value. This is a bitwise OR of
TRANSIENT and/or OVERRIDE. Using TRANSIENT specifies the
value is to be marked transient (ie isTransient (name)
will return true). Not all data object implementations
support dynamic transience. OVERRIDE must be set if an
existing value is to be overwritten: if not set and a
value is already defined, then nothing is changed. The
IDataObject.setValue (name, value) call corresponds to
IDataBean.setValue (name, value, OVERRIDE).IDataObject.setValue(Object, Object)
public Object getValue(Object name)
IDataObject
getValue
in interface IDataObject
name
- The property "name" (may be any object).
IDataObject.setValue(Object, Object)
,
IDataObject.propertyIterator()
public Object getValue(int index)
public boolean isTransient(Object name)
IDataObject
isTransient
in interface IDataObject
name
- The property name.
public Iterator propertyIterator()
IDataObject
propertyIterator
in interface IDataObject
IDataObject.getValue(Object)
).IDataObject.getValue(Object)
,
PropertyValueIterator
public int size()
public Iterator iterator()
iterator
in interface Iterable
public int indexOf(Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |