FileDocCategorySizeDatePackage
WaveformPanelContainer.javaAPI DocExample1395Mon Jan 09 11:02:00 GMT 2006None

WaveformPanelContainer

public 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.JComponentcreateChannelDisplay(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 voidsetAudioToDisplay(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));
        }