megamek.common.util
Class DistractableAdapter

java.lang.Object
  extended by megamek.common.util.DistractableAdapter
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, Distractable

public class DistractableAdapter
extends java.lang.Object
implements Distractable, java.io.Serializable

This class implements the Distractable interface. It is intended to be the underlying implementation for any class that implements the interface. Created on February 29, 2004

Version:
1
Author:
James Damour
See Also:
Serialized Form

Constructor Summary
DistractableAdapter()
          Create a Distractable object.
 
Method Summary
 boolean isIgnoringEvents()
          Determine if the listener is currently distracted.
 void removeAllListeners()
          Stop just ignoring events and actually stop listening to them.
 void setIgnoringEvents(boolean distracted)
          Specify if the listener should be distracted.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistractableAdapter

public DistractableAdapter()
Create a Distractable object.

Method Detail

isIgnoringEvents

public boolean isIgnoringEvents()
Determine if the listener is currently distracted.

Specified by:
isIgnoringEvents in interface Distractable
Returns:
true if the listener is ignoring events.

setIgnoringEvents

public void setIgnoringEvents(boolean distracted)
Specify if the listener should be distracted.

Specified by:
setIgnoringEvents in interface Distractable
Parameters:
distract - true if the listener should ignore events false if the listener should pay attention again. Events that occured while the listener was distracted NOT going to be processed.

removeAllListeners

public void removeAllListeners()
Stop just ignoring events and actually stop listening to them.

Specified by:
removeAllListeners in interface Distractable