Class PropertysetItem

Class for handling a set of identified Properties. The elements contained in a MapItem can be referenced using locally unique identifiers. The class supports listeners who are interested in changes to the Property set managed by the class.

Synopsis

VERSION@

Since

3.0

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

addItemProperty(Object, Property)

Parameters

id

ID of the new Property

property

the Property to be added and associated with id

return

true if the operation succeeded, false if not

Tries to add a new Property into the Item.

addListener(Item.PropertySetChangeListener)

Parameters

listener

The new Listener to be registered.

Registers a new property set change listener for this Item.

getItemProperty(Object)

Parameters

id

identifier of the Property to get

return

the Property with the given ID or null

Gets the Property corresponding to the given Property ID stored in the Item. If the Item does not contain the Property, null is returned.

getItemPropertyIds()

Parameters

return

unmodifiable collection containing IDs of the Properties stored the Item

Gets the collection of IDs of all Properties stored in the Item.

removeItemProperty(Object)

Parameters

id

ID of the Property to be removed

return

true if the operation succeeded false if not

Removes the Property identified by ID from the Item. This functionality is optional. If the method is not implemented, the method always returns false .

removeListener(Item.PropertySetChangeListener)

Parameters

listener

Listener to be removed.

Removes a previously registered property set change listener.

toString()

Parameters

return

String representation of the Item contents

Gets the String representation of the contents of the Item. The format of the string is a space separated catenation of the String representations of the Properties contained by the Item.