Class VolumeChangeEvent

  • All Implemented Interfaces:
    Serializable

    public class VolumeChangeEvent
    extends EventObject
    Represents the event fired when playback volume value has changed.
    Author:
    Damian Minkov
    See Also:
    Serialized Form
    • Constructor Detail

      • VolumeChangeEvent

        public VolumeChangeEvent​(VolumeControl source,
                                 float level,
                                 boolean mute)
        Initializes a new VolumeChangeEvent which is to notify about a specific volume level and its mute state.
        Parameters:
        source - the VolumeControl which is the source of the change
        level - the volume level
        mute - true if the volume is muted; otherwise, false
        Throws:
        IllegalArgumentException - if source is null
    • Method Detail

      • getSourceVolumeControl

        public VolumeControl getSourceVolumeControl()
        Gets the VolumeControl which is the source of the change notified about by this VolumeChangeEvent.
        Returns:
        the VolumeControl which is the source of the change notified about by this VolumeChangeEvent
      • getLevel

        public float getLevel()
        Gets the volume level notified about by this VolumeChangeEvent.
        Returns:
        the volume level notified about by this VolumeChangeEvent
      • getMute

        public boolean getMute()
        Gets the indicator which determines whether the volume is muted.
        Returns:
        true if the volume is muted; otherwise, false