WaveformPanelContainerpublic class WaveformPanelContainer extends JPanel Created by IntelliJ IDEA.
User: Jonathan Simon
Date: Mar 20, 2005
Time: 5:08:57 PM
To change this template use File | Settings | File Templates. |
Fields Summary |
---|
private ArrayList | singleChannelWaveformPanels | private AudioInfo | audioInfo |
Constructors Summary |
---|
public WaveformPanelContainer()
setLayout(new GridLayout(0,1));
|
Methods Summary |
---|
private javax.swing.JComponent | createChannelDisplay(SingleWaveformPanel waveformPanel, int index)
JPanel panel = new JPanel(new BorderLayout());
panel.add(waveformPanel, BorderLayout.CENTER);
JLabel label = new JLabel("Channel " + ++index);
panel.add(label, BorderLayout.NORTH);
return panel;
| public void | setAudioToDisplay(javax.sound.sampled.AudioInputStream audioInputStream)
singleChannelWaveformPanels = new ArrayList();
audioInfo = new AudioInfo(audioInputStream);
for (int t=0; t<audioInfo.getNumberOfChannels(); t++){
SingleWaveformPanel waveformPanel
= new SingleWaveformPanel(audioInfo, t);
singleChannelWaveformPanels.add(waveformPanel);
add(createChannelDisplay(waveformPanel, t));
}
|
|