Package jmri.beans
@DefaultAnnotation({})
package jmri.beans
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, principallyBeanandPropertyChangeSupport, 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, principallyConstrainedBean,ConstrainedArbitraryBean, andVetoableChangeSupportprovide 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, principallyArbitraryBeanandConstrainedArbitraryBean, provide simple concrete implementations of that interface that can be built upon. - Provide basic implementations of specific types of Beans
-
IdentifiableandMutableIdentifiableprovide interfaces for a identity property.PreferencesBeanprovides a bean with methods for handling properties related to the JMRI preferences mechanisms.
- Extend
Beansintrospection tools BeanUtilprovides support for setting, getting, and discovering JMRI arbitrary properties.
-
ClassDescriptionGeneric implementation of
BeanInterfacewith a complete implementation ofPropertyChangeSupportand support for arbitrary properties defined at runtime.Provide 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.Generic implementation ofBeanInterfacewith a complete implementation ofPropertyChangeSupport.Simple interface for basic methods that implement JMRI Bean handling methods.JMRI-specific tools for the introspection of JavaBean properties.A Bean with support forVetoableChangeListeners.A Bean with support forVetoableChangeListeners.An Object that has an identity property that is not publicly mutable (it may be indirectly mutated).An object that has a publicly mutable identity property.Bean that implements some common code for preferences objects.Interface that defines the methods needed to fire property changes.A set of methods that would need to be implemented to ensure the implementing class provides a complete external interface for property changes.Implementation ofPropertyChangeSupportthat can be extended by classes that would normally need to implement the methods of PropertyChangeSupport independently.Sometimes 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).If constructed withSwingPropertyChangeListener(listener, true)this subclass ofPropertyChangeListenerensures listener is only ever notified on the Event Dispatch Thread.Generic implementation ofBeanInterfacethat supports arbitrary properties defined at runtime.Generic implementation ofBeanInterfacewithout support for arbitrary properties defined at runtime.Interface that defines the methods needed to fire vetoable property changes.A set of methods that would need to be implemented to ensure the implementing class provides a complete external interface for vetoable property changes.Implementation ofPropertyChangeSupportandVetoableChangeSupportthat can be extended by classes that would normally need to implement the methods of PropertyChangeSupport and VetoableChangeSupport independently.