Class CmsBurstEventManager

  • public final class CmsBurstEventManager
    extends java.lang.Object
    Takes care of the burst of the same event, by skipping the first ones and executing only the last one.

    Usage example:

       Window.addResizeHandler(new ResizeHandler() {
           public void onResize(ResizeEvent event) {
               CmsBurstEventManager.get().schedule("resize-window", new Command() {
                   public void execute() {
                       // resize
               }, 200);
    See Also:
    Original implementation
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel​(java.lang.String eventName)
      Removes the event from the manager.
      protected static CmsBurstEventManager get()
      Returns the singleton instance.
      void schedule​(java.lang.String name, command, int delayMsec)
      Adds an 'burst' event to the manager.
      • Methods inherited from class java.lang.Object

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

      • get

        protected static CmsBurstEventManager get()
        Returns the singleton instance.

        the singleton instance
      • schedule

        public void schedule​(java.lang.String name,
                             int delayMsec)
        Adds an 'burst' event to the manager.

        name - the unique name, which identifies the event
        command - command to execute when the timer expires
        delayMsec - the timer delay (it's reseted if multiple events are added)
      • cancel

        public void cancel​(java.lang.String eventName)
        Removes the event from the manager.

        eventName - the name of the event that we need to remove