Package org.esa.snap.core.datamodel
Class ProductNodeEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.esa.snap.core.datamodel.ProductNodeEvent
-
- All Implemented Interfaces:
Serializable
public class ProductNodeEvent extends EventObject
A product node event informs a product change listener about the source of the notification.- See Also:
ProductNodeListener
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
NODE_ADDED
static int
NODE_CHANGED
static int
NODE_DATA_CHANGED
static int
NODE_DISPOSING
static int
NODE_REMOVED
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ProductNodeEvent(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductNodeGroup
getGroup()
Object
getNewValue()
Gets the new property value if this is a property change event.Object
getOldValue()
Gets the old property value if this is a property change event.String
getPropertyName()
Gets the name of the property that was changed.ProductNode
getSourceNode()
int
getType()
String
toString()
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
NODE_CHANGED
public static final int NODE_CHANGED
- See Also:
- Constant Field Values
-
NODE_ADDED
public static final int NODE_ADDED
- See Also:
- Constant Field Values
-
NODE_REMOVED
public static final int NODE_REMOVED
- See Also:
- Constant Field Values
-
NODE_DATA_CHANGED
public static final int NODE_DATA_CHANGED
- See Also:
- Constant Field Values
-
NODE_DISPOSING
public static final int NODE_DISPOSING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProductNodeEvent
public ProductNodeEvent(ProductNode sourceNode, int type)
Constructs a product node event.- Parameters:
sourceNode
- The product node on which the Event initially occurred.type
- the event type
-
ProductNodeEvent
public ProductNodeEvent(ProductNode sourceNode, int type, ProductNodeGroup nodeGroup)
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 Detail
-
getType
public int getType()
- Returns:
- The event type.
-
getSourceNode
public final ProductNode getSourceNode()
- Returns:
- A reference to the originating product node, i.e. the one who fired the event.
-
getGroup
public ProductNodeGroup getGroup()
- Returns:
- A reference to the group on which a
NODE_ADDED
orNODE_REMOVED
event occurred. May be null.
-
getPropertyName
public String getPropertyName()
Gets the name of the property that was changed.- Returns:
- the name of the property that was changed.
-
getOldValue
public Object getOldValue()
Gets the old property value if this is a property change event.- Returns:
- the old value.
-
getNewValue
public Object getNewValue()
Gets the new property value if this is a property change event.- Returns:
- the new value.
-
toString
public String toString()
- Overrides:
toString
in classEventObject
-
-