Package gov.nasa.worldwind.event
Class WWEvent
- java.lang.Object
-
- java.util.EventObject
-
- gov.nasa.worldwind.event.WWEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BulkRetrievalEvent,Message,PositionEvent,RenderingEvent,SelectEvent
public class WWEvent extends java.util.EventObjectWWEvent is the base class which all WorldWind event objects derive from. It extends Java's baseEventObjectby adding the capability to consume the event by callingconsume(). Consuming a WWEvent prevents is from being processed in the default manner by the source that originated the event. If the event cannot be consumed, callingconsume()has no effect, thoughisConsumed()returns whether or notconsume()has been called.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanconsumedDenotes whether or not the event has been consumed.
-
Constructor Summary
Constructors Constructor Description WWEvent(java.lang.Object source)Creates a new WWEvent with the object that originated the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume()Consumes the event so it will not be processed in the default manner by the source which originated it.booleanisConsumed()Returns whether or not the event has been consumed.
-
-
-
Method Detail
-
consume
public void consume()
Consumes the event so it will not be processed in the default manner by the source which originated it. This does nothing if the event cannot be consumed.
-
isConsumed
public boolean isConsumed()
Returns whether or not the event has been consumed.Note: if the event cannot be consumed, this still returns
trueifconsume()has been called, though this has no effect.- Returns:
trueif the event has been consumed, andfalseotherwise.
-
-