org.esa.beam.framework.datamodel
Class ProductNodeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.esa.beam.framework.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.

Version:
$Revision$ $Date$
Author:
Norman Fomferra
See Also:
ProductNodeListener, Serialized Form

Field Summary
static int NODE_ADDED
           
static int NODE_CHANGED
           
static int NODE_DATA_CHANGED
           
static int NODE_REMOVED
           
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
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
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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
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 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 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 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


Copyright © 2002-2013 Brockmann Consult GmbH. All Rights Reserved.