Class DelayedChangeManager


  • public class DelayedChangeManager
    extends java.lang.Object
    Helper for reducing the number of change events: calls to change() will be forwarded to DelayedChangeListener.change(). Forwarded calls are dropped if they would happen very quickly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void change()
      Delivers a change event to the associated DelayedChangeListener.
      void finish()
      Finishes a series of change events.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelayedChangeManager

        public DelayedChangeManager​(int initialDelay,
                                    int notificationDelay,
                                    @NotNull
                                    @NotNull DelayedChangeListener delayedChangeListener)
        Creates a new instance.
        Parameters:
        initialDelay - the initial delay for a series of events in milliseconds
        notificationDelay - the delay for following events in a series of events; in milliseconds
        delayedChangeListener - the delayed change listener to forward events to
    • Method Detail

      • finish

        public void finish()
        Finishes a series of change events. Calling this function is optional: if it is called, a pending change event is immediately forwarded; otherwise when the notification timeout has expired.