Class Variable<V>

java.lang.Object
eu.bandm.sighkn.Variable<V>
Direct Known Subclasses:
BooleanVariable

public abstract class Variable<V> extends Object
Central class to realize control values which can come from different sources and flow to different consumers. In practice, the following situations must be freely combinable:
  • programmatic, suprious setting by imperative code
  • clocked read of some signal source
  • irregular, but predictable setting by a kind of sequencer
  • spontanuous GUI input by slider / checkbox / textinput
  • Midi input (key, ctrl, etc.)
  • other external sensors
The current value may flow into:
  • continuous output as a signal source
  • programmatic/event like reaction in case of change
  • GUI visualization of current value
  • visualization plot of recent history
  • protocol of changes, either discrete or continuously sampled
The domain can be
  • some scalar domain like float or int
  • boolean
  • (seldom: text)
  • some PRODUCT of these
  • (seldom: a CO-product)
  • Field Details

    • name

      protected final String name
    • domain

      protected final Class<V> domain
    • isPrimitive

      protected final boolean isPrimitive
    • value

      protected V value
    • stateListener

      @Opt protected @Opt Runnable stateListener
  • Constructor Details

    • Variable

      protected Variable(String name, Class<V> domain)
  • Method Details

    • setChangeListener

      public Variable setChangeListener(Runnable stateListener)
    • get_GUI_withName

      public JPanel get_GUI_withName(boolean horiNotVert)
    • get_GUI

      public abstract JComponent get_GUI()
    • set_value

      public V set_value(V v)
    • get_value

      public V get_value()
    • propagateValueChange

      protected void propagateValueChange()