public class WaveView
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ComponentListener
Constructor and Description |
---|
WaveView() |
WaveView(java.lang.String fileName) |
WaveView(java.lang.String fileName,
int xLoc,
int yLoc) |
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.
|
public WaveView()
public WaveView(java.lang.String fileName)
public WaveView(java.lang.String fileName, int xLoc, int yLoc)
public void openFile()
public void setStartPos(int newOffset)
public int getStartPos()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void setResolution(int size)
size
- The new resolution value.public int getResolution()
public int getSampleRate()
public int getChannels()
public java.lang.String getFileName()
public int getWidth()
public void repaint()
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void setHeight(int val)
val
- The new height value.public void setAmplitude(int size)
size
- The new resolution value.public void playFile()
public void pauseFile()
public void unPauseFile()
String
- The name of the file to be played.