Package org.esa.snap.core.datamodel
Class ProductNodeEvent
java.lang.Object
java.util.EventObject
org.esa.snap.core.datamodel.ProductNodeEvent
- All Implemented Interfaces:
Serializable
A product node event informs a product change listener about the source of the notification.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionProductNodeEvent(ProductNode sourceNode, int type) Constructs a product node event.ProductNodeEvent(ProductNode sourceNode, int type, ProductNodeGroup nodeGroup) Constructs a product node event.ProductNodeEvent(ProductNode sourceNode, String propertyName, Object oldValue, Object newValue) Constructs a productEvent object. -
Method Summary
Modifier and TypeMethodDescriptiongetGroup()Gets the new property value if this is a property change event.Gets the old property value if this is a property change event.Gets the name of the property that was changed.final ProductNodeintgetType()toString()Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
NODE_CHANGED
public static final int NODE_CHANGED- See Also:
-
NODE_ADDED
public static final int NODE_ADDED- See Also:
-
NODE_REMOVED
public static final int NODE_REMOVED- See Also:
-
NODE_DATA_CHANGED
public static final int NODE_DATA_CHANGED- See Also:
-
NODE_DISPOSING
public static final int NODE_DISPOSING- See Also:
-
-
Constructor Details
-
ProductNodeEvent
Constructs a product node event.- Parameters:
sourceNode- The product node on which the Event initially occurred.type- the event type
-
ProductNodeEvent
Constructs a product node event.- Parameters:
sourceNode- The product node on which the Event initially occurred.type- the event typenodeGroup- If event type is NODE_ADDED or NODE_REMOVED this is the parent group to which the source node was added to or removed from.
-
ProductNodeEvent
public ProductNodeEvent(ProductNode sourceNode, String propertyName, Object oldValue, Object newValue) Constructs a productEvent object.- Parameters:
sourceNode- The product node whose property has changedpropertyName- The name of the property that was changed.oldValue- The old value.newValue- The new value.
-
-
Method Details
-
getType
public int getType()- Returns:
- The event type.
-
getSourceNode
- Returns:
- A reference to the originating product node, i.e. the one who fired the event.
-
getGroup
- Returns:
- A reference to the group on which a
NODE_ADDEDorNODE_REMOVEDevent occurred. May be null.
-
getPropertyName
Gets the name of the property that was changed.- Returns:
- the name of the property that was changed.
-
getOldValue
Gets the old property value if this is a property change event.- Returns:
- the old value.
-
getNewValue
Gets the new property value if this is a property change event.- Returns:
- the new value.
-
toString
- Overrides:
toStringin classEventObject
-