Revision 3fc994b2
Added by Leszek Koltunski about 8 years ago
src/main/java/org/distorted/library/DistortedEffectQueues.java | ||
---|---|---|
234 | 234 |
* |
235 | 235 |
* @param el A class implementing the EffectListener interface that wants to get notifications. |
236 | 236 |
*/ |
237 |
public void addEventListener(EffectListener el)
|
|
237 |
public void registerForMessages(EffectListener el)
|
|
238 | 238 |
{ |
239 |
mV.addListener(el);
|
|
240 |
mF.addListener(el);
|
|
241 |
mM.addListener(el);
|
|
239 |
mV.registerForMessages(el);
|
|
240 |
mF.registerForMessages(el);
|
|
241 |
mM.registerForMessages(el);
|
|
242 | 242 |
} |
243 | 243 |
|
244 | 244 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
247 | 247 |
* |
248 | 248 |
* @param el A class implementing the EffectListener interface that no longer wants to get notifications. |
249 | 249 |
*/ |
250 |
public void removeEventListener(EffectListener el)
|
|
250 |
public void deregisterForMessages(EffectListener el)
|
|
251 | 251 |
{ |
252 |
mV.removeListener(el);
|
|
253 |
mF.removeListener(el);
|
|
254 |
mM.removeListener(el);
|
|
252 |
mV.deregisterForMessages(el);
|
|
253 |
mF.deregisterForMessages(el);
|
|
254 |
mM.deregisterForMessages(el);
|
|
255 | 255 |
} |
256 | 256 |
|
257 | 257 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/library/EffectQueue.java | ||
---|---|---|
118 | 118 |
|
119 | 119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
120 | 120 |
|
121 |
void addListener(EffectListener el)
|
|
121 |
void registerForMessages(EffectListener el)
|
|
122 | 122 |
{ |
123 | 123 |
if( mListeners==null ) mListeners = new Vector<>(2,2); |
124 | 124 |
|
... | ... | |
131 | 131 |
|
132 | 132 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
133 | 133 |
|
134 |
void removeListener(EffectListener el)
|
|
134 |
void deregisterForMessages(EffectListener el)
|
|
135 | 135 |
{ |
136 | 136 |
if( mListeners.remove(el) ) |
137 | 137 |
{ |
Also available in: Unified diff
onPause(): fix StarWars