Class HasValue.ValueChangeEvent<V>

    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      ValueChangeEvent​(Component component, HasValue<V> hasValue, V oldValue, boolean userOriginated)
      Creates a new ValueChange event containing the given value, originating from the given source component.
      ValueChangeEvent​(COMPONENT component, V oldValue, boolean userOriginated)
      Creates a new ValueChange event containing the current value of the given value-bearing source component.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Component getComponent()
      Returns the component.
      V getOldValue()
      Returns the value of the source before this value change event occurred.
      HasValue<V> getSource()  
      V getValue()
      Returns the new value that triggered this value change event.
      boolean isUserOriginated()
      Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.
      • Methods inherited from class java.util.EventObject

        toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ValueChangeEvent

        public ValueChangeEvent​(COMPONENT component,
                                V oldValue,
                                boolean userOriginated)
        Creates a new ValueChange event containing the current value of the given value-bearing source component.
        Type Parameters:
        COMPONENT - the type of the source component
        Parameters:
        component - the source component bearing the value, not null
        oldValue - the previous value held by the source of this event
        userOriginated - true if this event originates from the client, false otherwise.
      • ValueChangeEvent

        public ValueChangeEvent​(Component component,
                                HasValue<V> hasValue,
                                V oldValue,
                                boolean userOriginated)
        Creates a new ValueChange event containing the given value, originating from the given source component.
        Parameters:
        component - the component, not null
        hasValue - the HasValue instance bearing the value, not null
        oldValue - the previous value held by the source of this event
        userOriginated - true if this event originates from the client, false otherwise.
    • Method Detail

      • getOldValue

        public V getOldValue()
        Returns the value of the source before this value change event occurred.
        Returns:
        the value previously held by the source of this event
      • getValue

        public V getValue()
        Returns the new value that triggered this value change event.
        Returns:
        the new value
      • isUserOriginated

        public boolean isUserOriginated()
        Description copied from interface: HasUserOriginated
        Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.
        Specified by:
        isUserOriginated in interface HasUserOriginated
        Returns:
        true if this event originates from the client, false otherwise.
      • getComponent

        public Component getComponent()
        Returns the component.
        Returns:
        the component, not null
      • getSource

        public HasValue<V> getSource()
        Overrides:
        getSource in class java.util.EventObject