Package muntjac :: Package data :: Package util :: Module abstract_property :: Class AbstractProperty
[hide private]
[frames] | no frames]

Class AbstractProperty

source code

                            object --+    
                                     |    
                    property.IProperty --+
                                         |
                            object --+   |
                                     |   |
         property.IValueChangeNotifier --+
                                         |
                            object --+   |
                                     |   |
property.IReadOnlyStatusChangeNotifier --+
                                         |
                                        AbstractProperty
Known Subclasses:

Abstract base class for IProperty implementations.

Handles listener management for ValueChangeListeners and IReadOnlyStatusChangeListeners.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
isReadOnly(self)
Override for additional restrictions on what is considered a read-only property.
source code
 
setReadOnly(self, newStatus)
Sets the IProperty's read-only mode to the specified status.
source code
 
__str__(self)
Returns the value of the IProperty in human readable textual format.
source code
 
addListener(self, listener, iface=None)
Registers a new read-only status change listener for this IProperty.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Removes a previously registered read-only status change listener.
source code
 
removeCallback(self, callback, eventType=None) source code
 
fireReadOnlyStatusChange(self)
Sends a read only status change event to all registered listeners.
source code
 
fireValueChange(self)
Sends a value change event to all registered listeners.
source code
 
getListeners(self, eventType) source code
 
getCallbacks(self, eventType) source code

Inherited from property.IProperty: getType, getValue, setValue

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

Instance Variables [hide private]
  _readOnlyStatusChangeListeners
List of listeners who are interested in the read-only status
  _valueChangeListeners
List of listeners who are interested in the value changes of
  _readOnly
Is the IProperty read-only?
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

isReadOnly(self)

source code 

Override for additional restrictions on what is considered a read-only property.

Returns:
True if the IProperty is in read-only mode, False if it's not
Overrides: property.IProperty.isReadOnly

setReadOnly(self, newStatus)

source code 

Sets the IProperty's read-only mode to the specified status.

This functionality is optional, but all properties must implement the isReadOnly mode query correctly.

Parameters:
  • newStatus - new read-only status of the IProperty
Overrides: property.IProperty.setReadOnly
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Returns the value of the IProperty in human readable textual format. The return value should be assignable to the setValue method if the IProperty is not in read-only mode.

Returns:
String representation of the value stored in the IProperty
Overrides: object.__str__

addListener(self, listener, iface=None)

source code 

Registers a new read-only status change listener for this IProperty.

Parameters:
  • listener - the new Listener to be registered.
Overrides: property.IReadOnlyStatusChangeNotifier.addListener

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

source code 
Overrides: property.IReadOnlyStatusChangeNotifier.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a previously registered read-only status change listener.

Parameters:
  • listener - the listener to be removed.
Overrides: property.IReadOnlyStatusChangeNotifier.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: property.IReadOnlyStatusChangeNotifier.removeCallback