Package muntjac :: Package data :: Package util :: Module propertyset_item :: Class PropertysetItem
[hide private]
[frames] | no frames]

Class PropertysetItem

source code

                     object --+    
                              |    
                     item.IItem --+
                                  |
                     object --+   |
                              |   |
item.IPropertySetChangeNotifier --+
                                  |
                                 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.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getItemProperty(self, idd)
Gets the Property corresponding to the given Property ID stored in the Item.
source code
 
getItemPropertyIds(self)
Gets the collection of IDs of all Properties stored in the Item.
source code
 
removeItemProperty(self, idd)
Removes the Property identified by ID from the Item.
source code
 
addItemProperty(self, idd, prop)
Tries to add a new Property into the Item.
source code
 
__str__(self)
Gets the string representation of the contents of the Item.
source code
 
addListener(self, listener, iface=None)
Registers a new property set change listener for this Item.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Removes a previously registered property set change listener.
source code
 
removeCallback(self, callback, eventType=None) source code
 
fireItemPropertySetChange(self)
Sends a Property set change event to all interested listeners.
source code
 
getListeners(self, eventType) source code
 
getCallbacks(self, eventType) source code
 
clone(self)
Creates and returns a copy of this object.
source code
 
__eq__(self, obj) source code
 
__hash__(self)
hash(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

getItemProperty(self, idd)

source code 

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

Parameters:
  • idd - the identifier of the Property to get.
Returns:
the Property with the given ID or None
Overrides: item.IItem.getItemProperty

getItemPropertyIds(self)

source code 

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

Returns:
collection containing IDs of the Properties stored the Item
Overrides: item.IItem.getItemPropertyIds

removeItemProperty(self, idd)

source code 

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

Parameters:
  • idd - the ID of the Property to be removed.
Returns:
True if the operation succeeded False if not
Raises:
  • NotImplementedError - if the operation is not supported.
Overrides: item.IItem.removeItemProperty

addItemProperty(self, idd, prop)

source code 

Tries to add a new Property into the Item.

Parameters:
  • id - the ID of the new Property.
  • prop - the Property to be added and associated with the id.
Returns:
True if the operation succeeded, False if not
Raises:
  • NotImplementedError - if the operation is not supported.
Overrides: item.IItem.addItemProperty

__str__(self)
(Informal representation operator)

source code 

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.

Returns:
String representation of the Item contents
Overrides: object.__str__

addListener(self, listener, iface=None)

source code 

Registers a new property set change listener for this Item.

Parameters:
  • listener - the new Listener to be registered.
Overrides: item.IPropertySetChangeNotifier.addListener

addCallback(self, callback, eventType=None, *args)

source code 
Overrides: item.IPropertySetChangeNotifier.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a previously registered property set change listener.

Parameters:
  • listener - the Listener to be removed.
Overrides: item.IPropertySetChangeNotifier.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: item.IPropertySetChangeNotifier.removeCallback

clone(self)

source code 

Creates and returns a copy of this object.

The method clone performs a shallow copy of the PropertysetItem.

Note: All arrays are considered to implement the interface Cloneable. Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment, the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.

Raises:
  • CloneNotSupportedException - if the object's class does not support the Cloneable interface.

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)