Class PropertyChangeManager

  • Direct Known Subclasses:
    PropertyChangeManagerDesktop

    public class PropertyChangeManager
    extends java.lang.Object
    Basic property change manager w/o java bean support. Works on android, too.
    • Field Detail

      • events

        protected java.util.List<IEvent> events
        The event list.
      • pcls

        protected java.util.Map<java.lang.Object,​java.util.Map<IResultCommand<IFuture<java.lang.Void>,​PropertyChangeEvent>,​java.lang.Object>> pcls
        The property change listeners. Listener type must be object, because java.beans.PropertyChangeListener/jadex.commons.beans.PropertyChangeListener don't share an interface
      • PCL

        protected static java.lang.Class<?>[] PCL
        The argument types for property change listener adding/removal (cached for speed).
    • Constructor Detail

      • PropertyChangeManager

        protected PropertyChangeManager()
        Protected Constructor to prevent direct instantiation
    • Method Detail

      • createInstance

        public static PropertyChangeManager createInstance()
        Returns a new PropertyChangeManager instance
      • removePCL

        protected void removePCL​(java.lang.Object object,
                                 java.lang.Object pcl)
        Remove a listener from an object.
      • addPropertyChangeListener

        public void addPropertyChangeListener​(java.lang.Object object,
                                              IResultCommand<IFuture<java.lang.Void>,​PropertyChangeEvent> eventadder)
        Add a property change listener.
      • removePropertyChangeListener

        public void removePropertyChangeListener​(java.lang.Object object,
                                                 IResultCommand<IFuture<java.lang.Void>,​PropertyChangeEvent> eventadder)
        Deregister a value for observation. if its a bean then remove the property listener.
      • addEvent

        public void addEvent​(IEvent event)
        Add an event.
      • hasEvents

        public boolean hasEvents()
        Test if events are available.
        Returns:
        True, if has events.
      • removeEvent

        public IEvent removeEvent​(int index)
        Remove an event.
        Parameters:
        index - The index.
      • getSize

        public int getSize()
        Get the number of events.
        Returns:
        The number of events.
      • getAddMethod

        protected java.lang.reflect.Method getAddMethod​(java.lang.Object object)
        Get listener add method