Class ProductNodeEvent

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