Class SoundActionHandler


  • public class SoundActionHandler
    extends ActionHandler
    Create a handler to handler "Sound" actions. The name of this feature is SoundActionHandler

    This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

    Since:
    2.8
    • Constructor Detail

      • SoundActionHandler

        public SoundActionHandler()
        Create a new SoundActionHandler
        Since:
        2.11
    • Method Detail

      • run

        public void run​(DocumentPanel docpanel,
                        PDFAction action)
        Description copied from class: ActionHandler
        Run the specified action
        Specified by:
        run in class ActionHandler
        Parameters:
        docpanel - the DocumentPanel running the action
        action - the action
      • playSound

        public static void playSound​(PDFSound sound,
                                     boolean mix,
                                     boolean repeat,
                                     JComponent root)
        Play a sound. This method is static so can be called from elsewhere as well.
        Parameters:
        sound - the PDFSound object
        mix - whether to mix this sound (true) or if it should be the only sound playing (false)
        repeat - whether the sound should repeat until the next non-mixed sound is played
        root - the Component owning the sound.