Class SoundActionListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.HyperlinkListener

    public class SoundActionListener
    extends java.lang.Object
    implements javax.swing.event.HyperlinkListener
    Handles A tag with file:// media link.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void hyperlinkUpdate​(javax.swing.event.HyperlinkEvent hyperlinkEvent)
      When got .wav or *.WAV file, play it.
      static void playSound​(java.io.File file)
      Play specified file on default device.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SoundActionListener

        public SoundActionListener()
    • Method Detail

      • playSound

        public static void playSound​(java.io.File file)
        Play specified file on default device.
        Parameters:
        file - media file.
      • hyperlinkUpdate

        public void hyperlinkUpdate​(javax.swing.event.HyperlinkEvent hyperlinkEvent)
        When got .wav or *.WAV file, play it.

        Unknown file types and protocols silently ignored.

        Specified by:
        hyperlinkUpdate in interface javax.swing.event.HyperlinkListener
        Parameters:
        hyperlinkEvent - event on editor panes such as dictionary.