Class AbstractKnob

    • Constructor Detail

      • AbstractKnob

        public AbstractKnob()
    • Method Detail

      • getValue

        public final double getValue()
        Specified by:
        getValue in interface Knob
        Returns:
        the actual value
      • setValue

        public final void setValue​(double value)
        Description copied from interface: Knob
        set the actual value
        Specified by:
        setValue in interface Knob
        Parameters:
        value - the value to set
      • getOffset

        public final double getOffset()
        Specified by:
        getOffset in interface Knob
        Returns:
        the actual offset of the knob
      • setOffset

        public final void setOffset​(double offset)
        Description copied from interface: Knob
        set the actual offset of the knob
        Specified by:
        setOffset in interface Knob
        Parameters:
        offset - the offset to set
      • doSetTotalValue

        protected abstract void doSetTotalValue​(double value)
        has to be implemented by subclass to set the total value to madx. The only call from this is from setTotalValue, which also notifies the listeners.
        Parameters:
        value - the value to set
      • addListener

        public final void addListener​(KnobListener listener)
        Description copied from interface: Knob
        adds a listener which gets notified, if the knob value changes
        Specified by:
        addListener in interface Knob
        Parameters:
        listener - the listener to add
      • removeListener

        public final void removeListener​(KnobListener listener)
        Description copied from interface: Knob
        removes a listener if available.
        Specified by:
        removeListener in interface Knob
        Parameters:
        listener - the listener to remove