- java.lang.Object
-
- java.util.EventObject
-
- org.arakhne.afc.gis.maplayer.ConsumableEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MapLayerAttributeChangeEvent,MapLayerContentEvent,MapLayerHierarchyEvent
public class ConsumableEvent extends EventObject
This interface representes an event on the layer attribute changes.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:53
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- giscore
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ConsumableEvent(Object source)Constructs a prototypical Event.ConsumableEvent(Object source, boolean disappearWhenConsumed)Constructs a prototypical Event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsume()Mark this event as consumed.booleanisConsumed()Replies if this object was already marked as consumed.booleanisDisappearingWhenConsumed()Replies if this event should disappear when it was consumed.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
ConsumableEvent
public ConsumableEvent(Object source)
Constructs a prototypical Event.- Parameters:
source- The object on which the Event initially occurred.- Throws:
IllegalArgumentException- if source is null.
-
ConsumableEvent
public ConsumableEvent(Object source, boolean disappearWhenConsumed)
Constructs a prototypical Event.- Parameters:
source- The object on which the Event initially occurred.disappearWhenConsumed- indicates if the event is supposed to disappear when it was consumed.- Throws:
IllegalArgumentException- if source is null.
-
-
Method Detail
-
isConsumed
@Pure public boolean isConsumed()
Replies if this object was already marked as consumed.- Returns:
trueif the event was consumed, otherwisefalse
-
consume
public void consume()
Mark this event as consumed.
-
isDisappearingWhenConsumed
@Pure public boolean isDisappearingWhenConsumed()
Replies if this event should disappear when it was consumed.The use of this flag depends on the event forwarder implementations.
- Returns:
trueif the event is supposed to diseappear after its consumption, otherwisefalse
-
-