Class SettableObservable<T extends Observable>

    • Constructor Detail

      • SettableObservable

        public SettableObservable​(T modelValue)
        Constructs a new SettableObservable with the specified SettableProperty.modelValue
        Parameters:
        modelValue - a value to be set
    • Method Detail

      • addStaticListener

        public boolean addStaticListener​(ChangeListener listener)
        Adds the specified listener to the list of static listeners with the default priority ListenerPriority.NORMAL (0).
        Parameters:
        listener - element to be added
        Returns:
        true if the listener was successfully added. false if it was already present
      • addStaticListener

        public boolean addStaticListener​(ChangeListener listener,
                                         ListenerPriority priority)
        Adds the specified listener to the list of static listeners with the specified priority.
        Parameters:
        listener - element to be added
        priority - priority of this listener
        Returns:
        true if the listener was successfully added. false if it was already present
      • addStaticListener

        public boolean addStaticListener​(ChangeListener listener,
                                         int priority)
        Adds the specified listener to the list of static listeners with the specified priority.
        Parameters:
        listener - element to be added
        priority - priority of this listener
        Returns:
        true if the listener was successfully added. false if it was already present
      • removeStaticListener

        public boolean removeStaticListener​(ChangeListener listener)
        Removes the specified static listener from the list of listeners.
        Parameters:
        listener - element to be removed
        Returns:
        true if the listener was successfully removed. false if it was not found
      • addParent

        protected boolean addParent​(Observable observable)
        Sets the specified Observable as a parent of this SettableObservable. Note: this creates only one way binding. Observable.addSubObservable(Observable) method is recommended for setting up Observable relations. Method overridden to provide additional functionality.
        Overrides:
        addParent in class Observable
        Parameters:
        observable - parent to be added
        Returns:
        true if the Observable was successfully added. false if it was already present
      • removeParent

        protected boolean removeParent​(Observable observable)
        Removes the specified Observable from parents of this SettableObservable. Note: this removed one way binding only. Observable.removeSubObservable(Observable) method is recommended for removing Observable relations. Method overridden to provide additional functionality.
        Overrides:
        removeParent in class Observable
        Parameters:
        observable - parent to be removed
        Returns:
        true if the Observable was successfully removed. false if it was not found