jm.gui.wave

## Class WaveView

- java.lang.Object
- - jm.gui.wave.WaveView

- All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.ComponentListener, java.util.EventListener

      public class WaveView
      extends java.lang.Object
      implements java.awt.event.ActionListener, java.awt.event.ComponentListener

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WaveView()`
    `WaveView(java.lang.String fileName)`
    `WaveView(java.lang.String fileName, int xLoc, int yLoc)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(java.awt.event.ActionEvent e)`
    `void` | `componentHidden(java.awt.event.ComponentEvent e)`
    `void` | `componentMoved(java.awt.event.ComponentEvent e)`
    `void` | `componentResized(java.awt.event.ComponentEvent e)`
    `void` | `componentShown(java.awt.event.ComponentEvent e)`
    `int` | `getChannels()` Pass back the number of channels in the file currently being displayed.
    `java.lang.String` | `getFileName()` Pass on the file name of the currently displayed file.
    `int` | `getResolution()` Pass back the current display resolution.
    `int` | `getSampleRate()` Pass on the sample rate of the currently displayed file.
    `int` | `getStartPos()`
    `int` | `getWidth()` Pass the current width of this frame.
    `void` | `openFile()` Dialog to import an audio file
    `void` | `pauseFile()` Pause playback of an audio file jMusic audio playback via javaSound.
    `void` | `playFile()`
    `void` | `repaint()`
    `void` | `setAmplitude(int size)` Change the waveform amplitude magnification of the displayed waveform.
    `void` | `setHeight(int val)` Change the virtical zoom size of the displayed waveform.
    `void` | `setResolution(int size)` Change the horizontal zoom size of the displayed waveform.
    `void` | `setStartPos(int newOffset)`
    `void` | `unPauseFile()` Continue playback an audio file jMusic audio playback via javaSound.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WaveView

          public WaveView()

    - #### WaveView

          public WaveView(java.lang.String fileName)

    - #### WaveView

          public WaveView(java.lang.String fileName,
                  int xLoc,
                  int yLoc)

  - ### Method Detail

    - #### openFile

          public void openFile()

      Dialog to import an audio file

    - #### setStartPos

          public void setStartPos(int newOffset)

    - #### getStartPos

          public int getStartPos()

    - #### actionPerformed

          public void actionPerformed(java.awt.event.ActionEvent e)

      Specified by:
        `actionPerformed` in interface `java.awt.event.ActionListener`

    - #### setResolution

          public void setResolution(int size)

      Change the horizontal zoom size of the displayed waveform.
      Parameters:
        `size` - The new resolution value.

    - #### getResolution

          public int getResolution()

      Pass back the current display resolution.
      Returns:
        int The resolution value

    - #### getSampleRate

          public int getSampleRate()

      Pass on the sample rate of the currently displayed file.

    - #### getChannels

          public int getChannels()

      Pass back the number of channels in the file currently being displayed.

    - #### getFileName

          public java.lang.String getFileName()

      Pass on the file name of the currently displayed file.

    - #### getWidth

          public int getWidth()

      Pass the current width of this frame.

    - #### repaint

          public void repaint()

    - #### componentResized

          public void componentResized(java.awt.event.ComponentEvent e)

      Specified by:
        `componentResized` in interface `java.awt.event.ComponentListener`

    - #### componentHidden

          public void componentHidden(java.awt.event.ComponentEvent e)

      Specified by:
        `componentHidden` in interface `java.awt.event.ComponentListener`

    - #### componentMoved

          public void componentMoved(java.awt.event.ComponentEvent e)

      Specified by:
        `componentMoved` in interface `java.awt.event.ComponentListener`

    - #### componentShown

          public void componentShown(java.awt.event.ComponentEvent e)

      Specified by:
        `componentShown` in interface `java.awt.event.ComponentListener`

    - #### setHeight

          public void setHeight(int val)

      Change the virtical zoom size of the displayed waveform.
      Parameters:
        `val` - The new height value.

    - #### setAmplitude

          public void setAmplitude(int size)

      Change the waveform amplitude magnification of the displayed waveform.
      Parameters:
        `size` - The new resolution value.

    - #### playFile

          public void playFile()

    - #### pauseFile

          public void pauseFile()

      Pause playback of an audio file jMusic audio playback via javaSound. This method requires the javax.sound packages in Java 1.3 or higher.

    - #### unPauseFile

          public void unPauseFile()

      Continue playback an audio file jMusic audio playback via javaSound. This method requires the javax.sound packages in Java 1.3 or higher.
      Parameters:
        `String` - The name of the file to be played.