uk.org.toot.audio.fader
Class FaderControl

java.lang.Object
  extended by java.util.Observable
      extended by uk.org.toot.control.Control
          extended by uk.org.toot.control.LawControl
              extended by uk.org.toot.audio.fader.FaderControl
Direct Known Subclasses:
MixControls.GainControl

public class FaderControl
extends LawControl

A FaderControl extends LawControl and differs from FloatControl in that it is concerned with the unity gain point.


Constructor Summary
FaderControl(int id, FaderLaw law)
           
FaderControl(int id, FaderLaw law, float initialValue)
          Constructs a new float control object with the given parameters.
FaderControl(int id, FaderLaw law, float initialValue, java.lang.String minLabel, java.lang.String unityLabel, java.lang.String maxLabel)
          Constructs a new fader control object with the given parameters
 
Method Summary
 void applyPreset(java.lang.String name)
           
 java.lang.String getMaxLabel()
          Obtains the label for the maximum value, such as "Right" or "Full."
 java.lang.String getMinLabel()
          Obtains the label for the minimum value, such as "Left" or "Off."
 java.lang.String[] getPresetNames()
           
 java.lang.String getUnityLabel()
          Obtains the label for the mid-point value, such as "Center" or "Default."
 java.lang.String toString()
          Provides a string representation of the control
 
Methods inherited from class uk.org.toot.control.LawControl
getInsertColor, getIntValue, getLaw, getPrecision, getValue, getValueString, setInsertColor, setIntValue, setValue
 
Methods inherited from class uk.org.toot.control.Control
getAnnotation, getControlPath, getControlPath, getId, getName, getParent, isAdjusting, isEnabled, isHidden, isIndicator, setAdjusting, setAnnotation, setEnabled, setHidden, setName
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FaderControl

public FaderControl(int id,
                    FaderLaw law)

FaderControl

public FaderControl(int id,
                    FaderLaw law,
                    float initialValue,
                    java.lang.String minLabel,
                    java.lang.String unityLabel,
                    java.lang.String maxLabel)
Constructs a new fader control object with the given parameters

Parameters:
initialValue - the value that the control starts with when constructed
minLabel - the label for the minimum value, such as "-infinity"
unityLabel - the label for the unity value, such as "0dB"
maxLabel - the label for the maximum value, such as "+15dB"

FaderControl

public FaderControl(int id,
                    FaderLaw law,
                    float initialValue)
Constructs a new float control object with the given parameters. The labels are set to zero-length strings.

Parameters:
initialValue - the value that the control starts with when constructed
Method Detail

getPresetNames

public java.lang.String[] getPresetNames()
Overrides:
getPresetNames in class LawControl

applyPreset

public void applyPreset(java.lang.String name)
Overrides:
applyPreset in class LawControl

getMinLabel

public java.lang.String getMinLabel()
Obtains the label for the minimum value, such as "Left" or "Off."

Returns:
the minimum value label, or a zero-length string if no label has been set

getUnityLabel

public java.lang.String getUnityLabel()
Obtains the label for the mid-point value, such as "Center" or "Default."

Returns:
the mid-point value label, or a zero-length string if no label has been set

getMaxLabel

public java.lang.String getMaxLabel()
Obtains the label for the maximum value, such as "Right" or "Full."

Returns:
the maximum value label, or a zero-length string if no label has been set

toString

public java.lang.String toString()
Provides a string representation of the control

Overrides:
toString in class Control
Returns:
a string description


Copyright © 2004, 2005, 2006, 2007 Steve Taylor. All Rights Reserved.