Project

General

Profile

Download (1.67 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / EffectListener.java @ c6e1c219

1
package org.distorted.library;
2

    
3
///////////////////////////////////////////////////////////////////////////////////////////////////
4
/**
5
 * This interface lets users of the Distorted library get notified when something happens to one of the effects.
6
 * To receive the notifications, we first have to register with a call to {@link DistortedBitmap#addEventListener(EffectListener)}.
7
 * List of all possible events that can happen is defined in {@link EffectMessage}
8
 */
9

    
10
public interface EffectListener 
11
  {
12
/**
13
 * Gets called when event of type 'em' happens to effect 'effectID'. 
14
 * 
15
 * @param eventType  Type of event that happened.
16
 * @param effectID   ID of the effect the event happened to. This ID must have been previously returned by one
17
 *                   of the DistortedBitmap.{deform,distort,move,...} functions.
18
 * @param effectName Name of the effect as defined in EffectNames, e.g. if effectType==EffectNames.MOVE.ordinal(),
19
 *                   then the event happened to a MOVE effect.
20
 * @param bitmapID   the ID of the DistortedBitmap object, as returned by {@link DistortedBitmap#getID()}, this event
21
 *                   happened to. If the object has been created using a copy constructor from another instance of
22
 *                   DistortedBitmap, the ID here will be the one of the original object.
23
 * @param message    Any message string associated with it. 'Failed' event types have one.
24
 * @see EffectMessage
25
 * @see EffectNames
26
 */
27
   
28
  void effectMessage(final EffectMessage eventType, final long effectID, final int effectName, final long bitmapID, final String message);
29
  }
30

    
31
///////////////////////////////////////////////////////////////////////////////////////////////////
(8-8/30)