Project

General

Profile

« Previous | Next » 

Revision 6613266b

Added by Leszek Koltunski almost 8 years ago

Major: the MessageSender thread used to be running all the time in a tight loop!!

View differences:

src/main/java/org/distorted/library/message/EffectListener.java
21 21

  
22 22
///////////////////////////////////////////////////////////////////////////////////////////////////
23 23

  
24
import org.distorted.library.DistortedBitmap;
25 24
import org.distorted.library.EffectNames;
26 25

  
27 26
/**
28 27
 * This interface lets users of the Distorted library get notified when something happens to one of the effects.
29
 * To receive the notifications, we first have to register with a call to {@link DistortedBitmap#addEventListener(EffectListener)}.
28
 * To receive the notifications, we first have to register with a call to {@link org.distorted.library.DistortedObject#addEventListener(EffectListener)}.
30 29
 * List of all possible events that can happen is defined in {@link EffectMessage}
31 30
 */
32 31

  
33 32
public interface EffectListener 
34 33
  {
35 34
/**
36
 * Gets called when event of type 'em' happens to effect 'effectID'. 
35
 * Gets called when event of type 'eventType' happens to effect 'effectID'.
37 36
 * 
38 37
 * @param eventType  Type of event that happened.
39 38
 * @param effectID   ID of the effect the event happened to. This ID must have been previously returned by one
40
 *                   of the DistortedBitmap.{deform,distort,move,...} functions.
41
 * @param effectName Name of the effect as defined in EffectNames, e.g. if effectType==EffectNames.MOVE.ordinal(),
42
 *                   then the event happened to a MOVE effect.
43
 * @param bitmapID   the ID of the DistortedBitmap object, as returned by {@link DistortedBitmap#getID()}, this event
44
 *                   happened to. If the object has been created using a copy constructor from another instance of
45
 *                   DistortedBitmap, the ID here will be the one of the original object.
39
 *                   of the DistortedObject.{deform,distort,move,...} functions.
40
 * @param effectName Name of the effect as defined by EffectNames.ordinal()
41
 * @param bitmapID   the ID of the DistortedObject object, as returned by {@link org.distorted.library.DistortedObject#getID()},
42
 *                   this event happened to. If the Object has been created using a copy constructor
43
 *                   from another instance of DistortedObject, the ID here will be the one of the original object.
46 44
 * @param message    Any message string associated with it. 'Failed' event types have one.
47 45
 * @see EffectMessage
48 46
 * @see EffectNames

Also available in: Unified diff