This module contains support classes to make your own classes support JavaBeans compatible property change notifications.

class swingutils.beans.AutoChangeNotifier

Mix-in class that automatically fires property change events for public properties (those whose names don’t start with an underscore).


If you inherit from this class, make sure that its __setattr__ method is not shadowed by another __setattr__!

class swingutils.beans.BeanProperty(name, initval=None)

Descriptor class that fires a property change event from the host object when the value is updated. The containing class must have bean property support, either inherited from a Java class or from JavaBeanSupport.


class Foo(JavaBeanSupport):
    myAttribute = BeanProperty('myAttribute')
  • name – Attribute name of the bean property. This MUST be the same name as the created attribute, as it can’t be reliably obtained any other way.
  • initval – Default value for this property. Defaults to None.
class swingutils.beans.JavaBeanSupport

Class that provides support for listening to property change events.

This class does not provide a Java-compatible interface, so if you need that, inherit directly from java.beans.PropertyChangeSupport instead.

class swingutils.beans.MirrorObject(delegate=None)

This is a proxy class that provides bound properties support for objects that have no such support of their own. Only public properties (ones not starting with _) are mirrored.