Contains JMRI classes related to supporting JavaBeans and
PropertyChangeListeners. The classes in this package can be broadly separated into five purposes:
- Implementing the
PropertyChangeSupportlistener management API
- The PropertyChangeSupport API provides mechanisms for managing property
change listeners and for sending property change notifications.
PropertyChangeProvideris an interface that ensures implementations implement the basic methods allowing a listener to be added or removed and for a listener to listen to all changes or only to specific changes. Subclasses of PropertyChangeProvider in this package, principally
PropertyChangeSupport, provide simple concrete implementations of that interface that can be built upon.
- Implementing the
VetoableChangeSupportlistener management API
- The VetoableChangeSupport API provides mechanisms for managing property
change listeners that can veto a property change and for sending property
change notifications that can be vetoed.
VetoableChangeProvideris an interface that ensures implementations implement the basic methods allowing a listener to be added or removed and for a listener to listen to all changes or only to specific changes. Subclasses of VetoableChangeProvider in this package, principally
VetoableChangeSupportprovide simple concrete implementations of that interface that can be built upon.
- Implementing support for arbitrary properties
- A number of JMRI objects support the addition of user-defined properties
that are unknown until runtime. These properties can be added, changed, or
removed by user-defined scripts or other means.
ArbitraryPropertySupportis an interface that ensures implementations implement the basic methods for adding, removing, changing, and discovering those properties. Subclasses of ArbitraryPropertySupport in this package, principally
ConstrainedArbitraryBean, provide simple concrete implementations of that interface that can be built upon.
- Provide basic implementations of specific types of Beans
BeanUtilprovides support for setting, getting, and discovering JMRI arbitrary properties.
Interface Summary Interface Description BeanInterfaceSimple interface for basic methods that implement JMRI Bean handling methods. IdentifiableAn Object that has an identity property that is not publicly mutable (it may be indirectly mutated). MutableIdentifiableAn object that has a publicly mutable identity property. PropertyChangeFirerInterface that defines the methods needed to fire property changes. PropertyChangeProviderA set of methods that would need to be implemented to ensure the implementing class provides a complete external interface for property changes. SilenceablePropertyChangeProviderSometimes an external object needs to be able to mute property changes to prevent bottlenecks in constrained systems (e.g. when reading a file that may add a large number of Turnouts or Sensors to JMRI's internal representation of the model railroad). VetoableChangeFirerInterface that defines the methods needed to fire vetoable property changes. VetoableChangeProviderA set of methods that would need to be implemented to ensure the implementing class provides a complete external interface for vetoable property changes.
Class Summary Class Description ArbitraryBean ArbitraryPropertySupportProvide support for converging the Arbitrary* classes with the non-arbitrary versions of those classes so that the Arbitrary* version can extend the non-arbitrary class. Bean Beans Deprecated. BeanUtilJMRI-specific tools for the introspection of JavaBean properties. ConstrainedArbitraryBeanA Bean with support for
ConstrainedBeanA Bean with support for
PreferencesBeanBean that implements some common code for preferences objects. PropertyChangeSupportImplementation of
PropertyChangeSupportthat can be extended by classes that would normally need to implement the methods of PropertyChangeSupport independently.
SwingPropertyChangeListenerIf constructed with
SwingPropertyChangeListener(listener, true)this subclass of
PropertyChangeListenerensures listener is only ever notified on the Event Dispatch Thread.
UnboundArbitraryBeanGeneric implementation of
BeanInterfacethat supports arbitrary properties defined at runtime.
UnboundBeanGeneric implementation of
BeanInterfacewithout support for arbitrary properties defined at runtime.