Control

org.appliedtopology.tda4j.plot.Control
See theControl companion object
final case class Control(name: String, min: Double, max: Double, value: Double, label: String = ..., stops: Vector[Double] = ..., step: Option[Double] = ..., play: Option[Double] = ...)

A number the viewer can set: a slider with a name, a range and a starting value, which behaviors refer to by name.

Value parameters

label

what the page writes beside it (ε); the name when empty

name

what behaviors call it (a letter, then letters, digits, _ or -)

play

when given, a play button sweeps from the value the slider is at to max in this many seconds

step

the grid of a smooth slider: a thousandth of the range when not given

stops

when given, the slider steps through exactly these values (the values at which the picture changes), in order, and the arrow keys move from one to the next; otherwise it runs smoothly from min to max

Attributes

Companion
object
Experimental
true
Source
Interactive.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def shownName: String

What the page writes beside the slider.

What the page writes beside the slider.

Attributes

Source
Interactive.scala
def startingAt(v: Double): Control

This control starting at v.

This control starting at v.

Attributes

Source
Interactive.scala
def withLabel(text: String): Control

This control with the label text.

This control with the label text.

Attributes

Source
Interactive.scala
def withPlay(seconds: Double): Control

This control with a play button that sweeps to the maximum in seconds.

This control with a play button that sweeps to the maximum in seconds.

Attributes

Source
Interactive.scala
def withStops(values: Seq[Double]): Control

This control stepping through values (sorted, repeats dropped) instead of sliding smoothly; the starting value moves to the nearest stop.

This control stepping through values (sorted, repeats dropped) instead of sliding smoothly; the starting value moves to the nearest stop.

Attributes

Source
Interactive.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala