Class DecoratingVetoableValue<T>

    • Constructor Detail

      • DecoratingVetoableValue

        public DecoratingVetoableValue​(IObservableValue<T> decorated,
                                       boolean disposeDecoratedOnDispose)
        Parameters:
        decorated - the observable value being decorated
        disposeDecoratedOnDispose - whether the decorated observable should be disposed when the decorator is disposed
    • Method Detail

      • fireValueChanging

        protected boolean fireValueChanging​(ValueDiff<T> diff)
        Notifies listeners about a pending change, and returns true if no listener vetoed the change.
        Parameters:
        diff - the pending change
        Returns:
        false if the change was vetoed, true otherwise
      • addListener

        protected void addListener​(java.lang.Object listenerType,
                                   IObservablesListener listener)
        Parameters:
        listenerType - arbitrary object to identify a type of the listener
        listener - the listener to add; not null
      • removeListener

        protected void removeListener​(java.lang.Object listenerType,
                                      IObservablesListener listener)
        Parameters:
        listenerType - arbitrary object to identify a type of the listener
        listener - the listener to remove; not null
      • hasListeners

        protected boolean hasListeners()
      • getRealm

        public Realm getRealm()
        Returns:
        Returns the realm.
      • clone

        protected java.lang.Object clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException