FileDocCategorySizeDatePackage
EffectParameter.javaAPI DocAndroid 5.1 API2460Thu Mar 12 22:22:30 GMT 2015com.android.effectstest

EffectParameter

public abstract class EffectParameter extends Object implements SeekBar.OnSeekBarChangeListener

Fields Summary
private static final String
TAG
protected int
mMin
protected int
mMax
protected String
mUnit
protected android.widget.SeekBar
mSeekBar
protected android.widget.TextView
mValueText
Constructors Summary
public EffectParameter(int min, int max, android.widget.SeekBar seekBar, android.widget.TextView textView, String unit)


                
        mMin = min;
        mMax = max;
        mSeekBar = seekBar;
        mValueText = textView;
        mUnit = unit;
        byte[] paramBuf = new byte[4];

        mSeekBar.setMax(max-min);
    
Methods Summary
public voiddisplayValue(int value, boolean fromTouch)

        String text = Integer.toString(value)+" "+mUnit;
        mValueText.setText(text);
        if (!fromTouch) {
            mSeekBar.setProgress(value - mMin);
        }
    
public abstract java.lang.IntegergetParameter()

public voidonProgressChanged(android.widget.SeekBar seekBar, int progress, boolean fromTouch)


        if (seekBar != mSeekBar) {
            Log.e(TAG, "onProgressChanged called with wrong seekBar");
            return;
        }

        int value = progress + mMin;
        if (fromTouch) {
            setParameter(value);
        }

        displayValue(getParameter(), fromTouch);
    
public voidonStartTrackingTouch(android.widget.SeekBar seekBar)

    
public voidonStopTrackingTouch(android.widget.SeekBar seekBar)

    
public abstract voidsetEffect(java.lang.Object effect)

public voidsetEnabled(boolean e)

        mSeekBar.setEnabled(e);
    
public abstract voidsetParameter(java.lang.Integer value)

public voidupdateDisplay()

        displayValue(getParameter(), false);