Package uk.ac.qmul.eecs.depic.daw
Class SoundWaveEvent
- java.lang.Object
-
- java.util.EventObject
-
- uk.ac.qmul.eecs.depic.daw.SoundWaveEvent
-
public class SoundWaveEvent extends java.util.EventObject
An event observed by SoundWaveListeners- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
AUTOMATION_CHANGED
Event generated when an automation is changed.static java.lang.String
CLOSE
/** Event generated when the sound wave is closed and all the related resources (sound file descriptors etc.) disposed.static java.lang.String
COPY
static java.lang.String
CUT
static java.lang.String
INSERT
static java.lang.String
OPEN
Event generated when an audio file is open and a new sound wave is created.static java.lang.String
PASTE
static java.lang.String
PAUSE
Event generated when the sound wave playback is paused.static java.lang.String
PEAK_METER
static java.lang.String
POSITION_CHANGED
Event generated when the sound wave's cursor position changes as a consequence of scrubbing through the sound wave.static java.lang.String
SCALE_FACTOR_CHANGED
Event generated when the current zoom factor of theSoundWave
is changed.static java.lang.String
SCAN
argument is the scanning poistionstatic java.lang.String
SELECTION_CHANGED
Event generated when the sound wave selection changes.static java.lang.String
START
Event generated when the sound wave playback is started.static java.lang.String
STOP
Event generated when the sound wave playback is stopped.
-
Constructor Summary
Constructors Constructor and Description SoundWaveEvent(SoundWave soundWave, java.lang.String type)
Creates a new Sound event with no argumentSoundWaveEvent(SoundWave soundWave, java.lang.String type, java.lang.Object args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Object
getArgs()
Returns the arguments of this event.SoundWave
getSource()
Returns a reference to the sound wave this event originated fromjava.lang.String
getType()
void
setArgs(java.lang.Object args)
-
-
-
Field Detail
-
AUTOMATION_CHANGED
public static final java.lang.String AUTOMATION_CHANGED
Event generated when an automation is changed. The argument of this event is the newAutomation
object which has been set as current for the sound wave. If the automation was of StringNONE
, then the argument will benull
- See Also:
- Constant Field Values
-
CLOSE
public static final java.lang.String CLOSE
/** Event generated when the sound wave is closed and all the related resources (sound file descriptors etc.) disposed.- See Also:
- Constant Field Values
-
COPY
public static final java.lang.String COPY
- See Also:
- Constant Field Values
-
CUT
public static final java.lang.String CUT
- See Also:
- Constant Field Values
-
INSERT
public static final java.lang.String INSERT
- See Also:
- Constant Field Values
-
OPEN
public static final java.lang.String OPEN
Event generated when an audio file is open and a new sound wave is created.- See Also:
- Constant Field Values
-
PASTE
public static final java.lang.String PASTE
- See Also:
- Constant Field Values
-
PAUSE
public static final java.lang.String PAUSE
Event generated when the sound wave playback is paused.- See Also:
- Constant Field Values
-
PEAK_METER
public static final java.lang.String PEAK_METER
- See Also:
- Constant Field Values
-
POSITION_CHANGED
public static final java.lang.String POSITION_CHANGED
Event generated when the sound wave's cursor position changes as a consequence of scrubbing through the sound wave. The argument is an openSelection
, normalized toSoundWave
's current scale factor, whose start value is the new position.
-
SCALE_FACTOR_CHANGED
public static final java.lang.String SCALE_FACTOR_CHANGED
Event generated when the current zoom factor of theSoundWave
is changed.- See Also:
- Constant Field Values
-
SCAN
public static final java.lang.String SCAN
argument is the scanning poistion- See Also:
- Constant Field Values
-
SELECTION_CHANGED
public static final java.lang.String SELECTION_CHANGED
Event generated when the sound wave selection changes. The event argument is aSelection
object with the new selection.- See Also:
- Constant Field Values
-
START
public static final java.lang.String START
Event generated when the sound wave playback is started.- See Also:
- Constant Field Values
-
STOP
public static final java.lang.String STOP
Event generated when the sound wave playback is stopped.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SoundWaveEvent
public SoundWaveEvent(SoundWave soundWave, java.lang.String type)
Creates a new Sound event with no argument- Parameters:
soundWave
-type
-
-
SoundWaveEvent
public SoundWaveEvent(SoundWave soundWave, java.lang.String type, java.lang.Object args)
-
-
Method Detail
-
getSource
public SoundWave getSource()
Returns a reference to the sound wave this event originated from- Overrides:
getSource
in classjava.util.EventObject
- Returns:
- the sound wave this event originated from
-
getType
public java.lang.String getType()
-
getArgs
public java.lang.Object getArgs()
Returns the arguments of this event. Different types of event require different type of arguments. See the static event types to know which argument they come with.- Returns:
- the argument object or
null
if this event was constructed with no arguments.
-
setArgs
public void setArgs(java.lang.Object args)
-
-