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:
  • Field Details

  • Constructor Details

    • 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 type
      nodeGroup - 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 changed
      propertyName - 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

      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 or NODE_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 class EventObject