class Dep[T, V] extends StateChannel[T]

Dep is very much like a Val, but is also a Channel. The basic purpose is to represent a value dependent upon another variable. An example of this might be if you are representing a position left and you also wanted to represent right as well (which would be left + width). These two variables are dependent upon each other and don't fit well as Vars. An example usage might be:

val left: Var[Double] = Var(0.0) val width: Var[Double] = Var(0.0) val right: Dep[Double, Double] = Dep(left, width)

If an instance is submissive it removes adjustment from being part of the mutation dependency. For example: in the above scenario if you set width to 100.0 and right to 125.0 then left will be 25.0. Now, what should happen if you change width to 50.0? Should left change to 75.0 (submissive = false) or should right change to 75.0 (submissive = true)?

Linear Supertypes
StateChannel[T], Channel[T], State[T], Observable[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Dep
  2. StateChannel
  3. Channel
  4. State
  5. Observable
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Dep(variable: Var[V], adjustment: ⇒ T, submissive: Boolean)(implicit connector: DepConnector[T, V])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def :=(value: ⇒ T): Unit

    Convenience method to send a value to set similarly to an assignment operator.

    Convenience method to send a value to set similarly to an assignment operator.

    value

    the value to apply

    Definition Classes
    Channel
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def and(that: Observable[T]): Observable[T]
    Definition Classes
    Observable
  6. def apply(): T
    Definition Classes
    DepState
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def attach(f: (T) ⇒ Unit, priority: Double = Listener.Priority.Normal): Listener[T]

    Attaches a function to listen to values fired against this Observable.

    Attaches a function to listen to values fired against this Observable.

    f

    function listener

    returns

    the supplied function. This reference is useful for detaching the function later

    Definition Classes
    DepObservable
  9. def attachAndFire(f: (T) ⇒ Unit): Listener[T]
    Definition Classes
    State
  10. def bind[V](that: StateChannel[V], setNow: BindSet = BindSet.LeftToRight)(implicit t2v: (T) ⇒ V, v2t: (V) ⇒ T): Binding[T, V]
    Definition Classes
    StateChannel
  11. def changed(value: T, previous: T, type: InvocationType): Unit
    Attributes
    protected[reactify]
    Definition Classes
    State
  12. def changes(listener: ChangeListener[T]): Listener[T]

    Works similarly to attach, but also references the previous value that was fired.

    Works similarly to attach, but also references the previous value that was fired. This is useful when you need to handle changes, not just new values.

    listener

    the ChangeListener

    returns

    the listener attached. This can be passed to detach to remove this listener

    Definition Classes
    DepStateObservable
  13. def clear(): Unit

    Clears all attached observers from this Observable.

    Clears all attached observers from this Observable.

    Definition Classes
    Observable
  14. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. def detach(listener: Listener[T]): Unit

    Detaches a function from listening to this Observable.

    Detaches a function from listening to this Observable.

    listener

    function listener that was previously attached

    Definition Classes
    DepObservable
  16. def dispose(): Unit

    Cleans up all cross references in preparation for releasing for GC.

    Cleans up all cross references in preparation for releasing for GC.

    Definition Classes
    Observable
  17. def distinct: Boolean
    Definition Classes
    DepState
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def fire(value: T, type: InvocationType): Unit
    Attributes
    protected[reactify]
    Definition Classes
    DepObservable
  22. final def fireRecursive(value: T, type: InvocationType, invocation: Invocation, observers: List[Listener[T]]): Unit
    Attributes
    protected
    Definition Classes
    Observable
  23. def future(condition: (T) ⇒ Boolean = (t: T) => true): Future[T]

    Returns a Future[T] that represents the value of the next firing of this Observable.

    Returns a Future[T] that represents the value of the next firing of this Observable.

    condition

    the condition under which the listener will be invoked. Defaults to always return true.

    Definition Classes
    Observable
  24. final def get: T
    Definition Classes
    State
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  27. val internal: Val[T]
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  32. def observe(listener: Listener[T]): Listener[T]

    Direct attachment of a listener.

    Direct attachment of a listener.

    listener

    the listener to attach

    returns

    the same listener supplied

    Definition Classes
    Observable
  33. def observing: Set[Observable[_]]
    Definition Classes
    DepState
  34. def on(f: ⇒ Unit, priority: Double = Listener.Priority.Normal): Listener[T]

    Works like attach, but doesn't receive the fired value.

    Works like attach, but doesn't receive the fired value.

    f

    function to invoke on fire

    returns

    listener

    Definition Classes
    Observable
  35. def once(f: (T) ⇒ Unit, condition: (T) ⇒ Boolean = (_: T) => true, priority: Double = Listener.Priority.Normal): Listener[T]

    Invokes the listener only one time and then detaches itself.

    Invokes the listener only one time and then detaches itself. If supplied, the condition filters the scenarios in which the listener will be invoked.

    f

    the function listener

    condition

    the condition under which the listener will be invoked. Defaults to always return true.

    Definition Classes
    Observable
  36. def set(value: ⇒ T, submissive: Boolean): Unit
  37. def set(value: ⇒ T): Unit

    Fires the value to all attached listeners.

    Fires the value to all attached listeners.

    value

    the value to apply

    Definition Classes
    DepChannelState
  38. def static(value: T): Unit
    Definition Classes
    StateChannelState
  39. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    Dep → AnyRef → Any
  41. def value(): T
    Attributes
    protected
    Definition Classes
    DepState
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from StateChannel[T]

Inherited from Channel[T]

Inherited from State[T]

Inherited from Observable[T]

Inherited from AnyRef

Inherited from Any

Ungrouped