Chapter 11. Package com.itmill.toolkit.data.util

Table of Contents

Class BeanItem
Synopsis
BeanItem(Object)
BeanItem(Object, Collection)
getBean()
Class ContainerHierarchicalWrapper
Synopsis
ContainerHierarchicalWrapper(Container)
addContainerProperty(Object, Class, Object)
addItem()
addItem(Object)
addListener(Container.ItemSetChangeListener)
addListener(Container.PropertySetChangeListener)
areChildrenAllowed(Object)
getChildren(Object)
getParent(Object)
hasChildren(Object)
isRoot(Object)
removeAllItems()
removeContainerProperty(Object)
removeItem(Object)
removeListener(Container.ItemSetChangeListener)
removeListener(Container.PropertySetChangeListener)
rootItemIds()
setChildrenAllowed(Object, boolean)
setParent(Object, Object)
updateHierarchicalWrapper()
Class ContainerOrderedWrapper
Synopsis
ContainerOrderedWrapper(Container)
addContainerProperty(Object, Class, Object)
addItem()
addItem(Object)
addItemAfter(Object)
addItemAfter(Object, Object)
addListener(Container.ItemSetChangeListener)
addListener(Container.PropertySetChangeListener)
firstItemId()
isFirstId(Object)
isLastId(Object)
lastItemId()
nextItemId(Object)
prevItemId(Object)
removeAllItems()
removeContainerProperty(Object)
removeItem(Object)
removeListener(Container.ItemSetChangeListener)
removeListener(Container.PropertySetChangeListener)
updateOrderWrapper()
Class FilesystemContainer
Synopsis
FilesystemContainer(File)
FilesystemContainer(File, boolean)
FilesystemContainer(File, FilenameFilter, boolean)
FilesystemContainer(File, String, boolean)
FILE_PROPERTIES
PROPERTY_ICON
PROPERTY_LASTMODIFIED
PROPERTY_NAME
PROPERTY_SIZE
addContainerProperty(Object, Class, Object)
addItem()
addItem(Object)
addRoot(File)
areChildrenAllowed(Object)
getChildren(Object)
getContainerProperty(Object, Object)
getContainerPropertyIds()
getFilter()
getParent(Object)
getType(Object)
hasChildren(Object)
isRecursive()
isRoot(Object)
removeAllItems()
removeContainerProperty(Object)
removeItem(Object)
rootItemIds()
setChildrenAllowed(Object, boolean)
setFilter(FilenameFilter)
setFilter(String)
setParent(Object, Object)
setRecursive(boolean)
size()
Class FilesystemContainer.FileExtensionFilter
Synopsis
FilesystemContainer.FileExtensionFilter(String)
accept(File, String)
Class FilesystemContainer.FileItem
Synopsis
addItemProperty(Object, Property)
getItemProperty(Object)
getItemPropertyIds()
removeItemProperty(Object)
toString()
Class HierarchicalContainer
Synopsis
addItem()
addItem(Object)
areChildrenAllowed(Object)
getChildren(Object)
getParent(Object)
hasChildren(Object)
isRoot(Object)
removeAllItems()
removeItem(Object)
rootItemIds()
setChildrenAllowed(Object, boolean)
setParent(Object, Object)
Class IndexedContainer
Synopsis
addContainerProperty(Object, Class, Object)
addItem()
addItem(Object)
addItemAfter(Object)
addItemAfter(Object, Object)
addItemAt(int)
addItemAt(int, Object)
addListener(Container.ItemSetChangeListener)
addListener(Container.PropertySetChangeListener)
addListener(Property.ValueChangeListener)
compare(Object, Object)
containsId(Object)
firstItemId()
getContainerProperty(Object, Object)
getContainerPropertyIds()
getIdByIndex(int)
getItem(Object)
getItemIds()
getSortableContainerPropertyIds()
getType(Object)
indexOfId(Object)
isFirstId(Object)
isLastId(Object)
lastItemId()
nextItemId(Object)
prevItemId(Object)
removeAllItems()
removeContainerProperty(Object)
removeItem(Object)
removeListener(Container.ItemSetChangeListener)
removeListener(Container.PropertySetChangeListener)
removeListener(Property.ValueChangeListener)
size()
sort(Object[], boolean[])
Class MethodProperty
Synopsis
MethodProperty(Class, Object, Method, Method)
MethodProperty(Class, Object, Method, Method, Object[], Object[], int)
MethodProperty(Class, Object, String, String)
MethodProperty(Class, Object, String, String, Object[], Object[], int)
MethodProperty(Object, String)
addListener(Property.ReadOnlyStatusChangeListener)
getType()
getValue()
isReadOnly()
removeListener(Property.ReadOnlyStatusChangeListener)
setArguments(Object[], Object[], int)
setReadOnly(boolean)
setValue(Object)
toString()
Exception MethodProperty.MethodException
Synopsis
MethodProperty.MethodException(String)
MethodProperty.MethodException(Throwable)
getCause()
getMethodProperty()
Class ObjectProperty
Synopsis
ObjectProperty(Object)
ObjectProperty(Object, Class)
ObjectProperty(Object, Class, boolean)
addListener(Property.ReadOnlyStatusChangeListener)
addListener(Property.ValueChangeListener)
getType()
getValue()
isReadOnly()
removeListener(Property.ReadOnlyStatusChangeListener)
removeListener(Property.ValueChangeListener)
setReadOnly(boolean)
setValue(Object)
toString()
Class PropertysetItem
Synopsis
addItemProperty(Object, Property)
addListener(Item.PropertySetChangeListener)
getItemProperty(Object)
getItemPropertyIds()
removeItemProperty(Object)
removeListener(Item.PropertySetChangeListener)
toString()

Provides various utility classes that implement the data layer functionality.

The first Property class, ObjectProperty , provides a simple class containing a typed data value. The second, MethodProperty , provides a way to bind a field of an object to the Property interface using the accessor methods for the field.

The next level of the data layer, the Item , is implemented by BeanItem , though it is only a simple wrapper to the former to provide the Item interface for any regular Java Bean.

The third level, the Container , has several implementations in the com.itmill.toolkit.data.util package.

<!-- Put @see and @since tags down here. -->

Class BeanItem

A wrapper class for adding the Item interface to any Java Bean.

Synopsis

Since

3.0

Inheritance Path.  java.lang.Object-> com.itmill.toolkit.data.util.PropertysetItem -> com.itmill.toolkit.data.util.BeanItem

BeanItem(Object)

Parameters

bean

the Java Bean to copy properties from

Creates a new instance of BeanItem and adds all properties of a Java Bean to it. The properties are identified by their respective bean names.

Note that this version only supports introspectable bean properties and their getter and setter methods. Stand-alone "is" and "are" methods are not supported.

BeanItem(Object, Collection)

Parameters

bean

the Java Bean to copy properties from

Creates a new instance of BeanItem and adds all listed properties of a Java Bean to it - in specified order. The properties are identified by their respective bean names.

Note that this version only supports introspectable bean properties and their getter and setter methods. Stand-alone "is" and "are" methods are not supported.

getBean()

Parameters

return

the bean object.

Get the underlying JavaBean object.