Package soundPlayback.swing
Class PlaySliderComponent
java.lang.Object
soundPlayback.swing.PlaySliderComponent
- Direct Known Subclasses:
EnvelopeSlider
,PlayFilterSlider
,PlayGainSlider
,PlaySpeedSlider
Generic component that can be used for sliders
in play control side panel bits
- Author:
- dg50
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ChangeListener changeListener) Add a change listener.double
Get the scaled value of the sliderabstract double
abstract double
abstract int
double
posToValue
(int pos) Convert a slider position to a real valuevoid
setDataValue
(double value) Set the scaled value of the sliderint
valueToPos
(double value) Convert a value to a slider position
-
Constructor Details
-
PlaySliderComponent
public PlaySliderComponent()
-
-
Method Details
-
getMinValue
public abstract double getMinValue() -
getMaxValue
public abstract double getMaxValue() -
getNSteps
public abstract int getNSteps() -
valueToPos
public int valueToPos(double value) Convert a value to a slider position- Parameters:
real
- value- Returns:
- slider position (0 - getNSteps)
-
posToValue
public double posToValue(int pos) Convert a slider position to a real value- Parameters:
pos
- slider position (0 - getNSteps)- Returns:
- real value
-
getSlider
- Returns:
- the slider
-
getDataValue
public double getDataValue()Get the scaled value of the slider- Returns:
- the real scaled value
-
setDataValue
public void setDataValue(double value) Set the scaled value of the slider- Parameters:
value
- the scaled value.
-
addChangeListener
Add a change listener.- Parameters:
changeListener
-
-