All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dashbuilder.renderer.chartjs.lib.event.AnimationCompleteEvent Maven / Gradle / Ivy

The newest version!
package org.dashbuilder.renderer.chartjs.lib.event;

import org.dashbuilder.renderer.chartjs.lib.Chart;

import com.google.gwt.event.shared.GwtEvent;

/**
 * Class represents event occurred when {@link Chart} animation has been finished
 */
public class AnimationCompleteEvent extends GwtEvent{

	private static Type TYPE = new Type();
	
	private Object sender;
	
	protected AnimationCompleteEvent(Object sender){
		this.sender = sender;
	}

	public Object getSender(){
		return sender;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type getAssociatedType() {
		return TYPE;
	}
	
	public static Type getType(){
		return TYPE;
	}

	@Override
	protected void dispatch(AnimationCompleteHandler handler) {
		handler.onAnimationComplete(this);
	}

	  public static void fire(HasAnimationCompleteHandlers source, Object sender) {
		  AnimationCompleteEvent event = new AnimationCompleteEvent(sender);
		  source.fireEvent(event);
	  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy