at.ofai.music.beatroot
class ZoomListener extends Object implements ActionListener
Field Summary | |
---|---|
BeatTrackDisplay | displayPanel The main data panel of BeatRoot's GUI |
JScrollBar | scroller The scrollbar for selecting what part of the audio data is displayed |
JTextField | valueField An editable text field containing the length (in seconds) of visible audio data |
Constructor Summary | |
---|---|
ZoomListener(BeatTrackDisplay btd, JScrollBar sb, JTextField vf) Constructor: |
Method Summary | |
---|---|
void | actionPerformed(ActionEvent e) Called when a zoom button is pressed or the text field is edited.
|
static double | delta(double value, double sign) Increments or decrements and rounds the length of visible audio data. |
Parameters: btd The main data panel of BeatRoot's GUI sb The scrollbar for selecting what part of the audio data is displayed vf The text field containing the length (in seconds) of visible audio data
Parameters: e The object indicating what kind of event occurred
Parameters: value The original length of visible audio data sign The direction of change (+1.0 or -1.0)
Returns: The new length of visible audio data