Class PropValueEvent

All Implemented Interfaces:
IPostEventProcessing

public class PropValueEvent extends BubbleEvent
The event that indicates that a property has been set for the first time or when it has been changed.
Author:
Christopher Mindus
  • Constructor Details Link icon

    • PropValueEvent Link icon

      public PropValueEvent(GProp<?> property, Object newValue, Object oldValue, PropMgr propMgr)
      Constructs a new remote property value event.
      Parameters:
      property - The property instance being changed or initialized.
      newValue - The new value.
      oldValue - The old value or null if previously uninitialized.
      propMgr - The property manager, must be non-null.
    • PropValueEvent Link icon

      public PropValueEvent(GProp<?> property, Object newValue, Object oldValue, IGProp<?> trigger, PropMgr propMgr)
      Constructs a new remote property value event.
      Parameters:
      property - The property instance being changed or initialized.
      newValue - The new value.
      oldValue - The old value or null if previously uninitialized.
      trigger - The trigger property, null for none.
      propMgr - The property manager, must be non-null.
    • PropValueEvent Link icon

      public PropValueEvent(GProp<?> property, Object newValue, Object oldValue)
      Constructs a new non-remote local property value event.
      Parameters:
      property - The property instance being changed or initialized.
      newValue - The new value.
      oldValue - The old value or null if previously uninitialized.
    • PropValueEvent Link icon

      public PropValueEvent(GProp<?> property, Object newValue, Object oldValue, IGProp<?> trigger)
      Constructs a new non-remote property value event.
      Parameters:
      property - The property instance being changed or initialized.
      newValue - The new value.
      oldValue - The old value or null if previously uninitialized.
      trigger - The trigger property, null for none.
  • Method Details Link icon

    • getRemotePropMgr Link icon

      public PropMgr getRemotePropMgr()
      Gets the (remote) Property Manager that caused the remote event.
      Returns:
      The Property Manager, null if not remote.
    • getNewValue Link icon

      public Object getNewValue()
      Gets the new value.
      Returns:
      the new value, could be null.
    • getOldValue Link icon

      public Object getOldValue()
      Gets the old value.
      Returns:
      old value or null if previously uninitialized.
    • getTrigger Link icon

      public GProp<?> getTrigger()
      Gets the trigger of the value change.
      Overrides:
      getTrigger in class GEvent
      Returns:
      The property that triggered this event, null for none.
    • isPropertyChange Link icon

      public boolean isPropertyChange(IGProp<?> property)
      Checks if the event is a property value change.
      Overrides:
      isPropertyChange in class GEvent
      Parameters:
      property - The property.
      Returns:
      true if the property just got changed in the container due to this event, false otherwise.
    • isPropertyChange Link icon

      public boolean isPropertyChange(PropCnr pc, Atom name)
      Checks if the event is a modification change of any property in the specified container.
      Overrides:
      isPropertyChange in class GEvent
      Parameters:
      pc - The property container.
      name - The property name to check for change.
      Returns:
      true if the property just got changed in the container due to this event, false otherwise.
    • isPropertyChange Link icon

      public boolean isPropertyChange(PropCnr pc, String name)
      Checks if the event is a modification change of any property in the specified container.
      Overrides:
      isPropertyChange in class GEvent
      Parameters:
      pc - The property container.
      name - The property name to check for change.
      Returns:
      true if the property just got changed in the container due to this event, false otherwise.
    • isClearCacheEvent Link icon

      public boolean isClearCacheEvent()
      Returns the state for a property container if this event is received in the onEventSelf method as a helper for it would need to clear the property container cache.
      Overrides:
      isClearCacheEvent in class GEvent
      Returns:
      true, always for this event.
    • isVerifyEvent Link icon

      public boolean isVerifyEvent()
      Returns if this event is a verify event for a container that processes verification.
      Overrides:
      isVerifyEvent in class GEvent
      Returns:
      true always.
    • paramString Link icon

      protected StringBuilder paramString(StringBuilder buf)
      Returns the parameter string representing the state of this event. This string is useful for debugging. Super classes adds extra information to the string by preceding it with a comma followed by the extra information.
      Overrides:
      paramString in class GEvent
      Parameters:
      buf - The StringBuilder to append the string to.
      Returns:
      The StringBuilder, i.e. the buf input parameter.