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 the SoundWave is changed.
      static java.lang.String SCAN
      argument is the scanning poistion
      static 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.
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor and Description
      SoundWaveEvent(SoundWave soundWave, java.lang.String type)
      Creates a new Sound event with no argument
      SoundWaveEvent(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 from
      java.lang.String getType() 
      void setArgs(java.lang.Object args) 
      • Methods inherited from class java.util.EventObject

        toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 new Automation object which has been set as current for the sound wave. If the automation was of String NONE, then the argument will be null
        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
      • 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
      • PAUSE

        public static final java.lang.String PAUSE
        Event generated when the sound wave playback is paused.
        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 open Selection, normalized to SoundWave's current scale factor, whose start value is the new position.
        See Also:
        Selection.convertFactor(Selection, int), Constant Field Values
      • SCALE_FACTOR_CHANGED

        public static final java.lang.String SCALE_FACTOR_CHANGED
        Event generated when the current zoom factor of the SoundWave 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 a Selection 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 class java.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)