Package soundPlayback.swing
Class PlaySpeedSlider
java.lang.Object
soundPlayback.swing.PlaySliderComponent
soundPlayback.swing.PlaySpeedSlider
slider to control playback rate.
Works on a log scale.
- Author:
- dg50
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
int
static String
getRatioString
(double speed) double
posToValue
(int pos) Convert a slider position to a real valuevoid
setEnabled
(boolean enable) int
valueToPos
(double value) Convert a value to a slider positionMethods inherited from class soundPlayback.swing.PlaySliderComponent
addChangeListener, getDataValue, getSlider, setDataValue
-
Constructor Details
-
PlaySpeedSlider
public PlaySpeedSlider() -
PlaySpeedSlider
-
-
Method Details
-
getRatioString
-
getRatioString
-
setEnabled
public void setEnabled(boolean enable) -
getMinValue
public double getMinValue()- Specified by:
getMinValue
in classPlaySliderComponent
-
getMaxValue
public double getMaxValue()- Specified by:
getMaxValue
in classPlaySliderComponent
-
getNSteps
public int getNSteps()- Specified by:
getNSteps
in classPlaySliderComponent
-
valueToPos
public int valueToPos(double value) Description copied from class:PlaySliderComponent
Convert a value to a slider position- Overrides:
valueToPos
in classPlaySliderComponent
- Returns:
- slider position (0 - getNSteps)
-
posToValue
public double posToValue(int pos) Description copied from class:PlaySliderComponent
Convert a slider position to a real value- Overrides:
posToValue
in classPlaySliderComponent
- Parameters:
pos
- slider position (0 - getNSteps)- Returns:
- real value
-