JPanel visTypesPanel = new JPanel();
visTypesPanel.setLayout(new BoxLayout(visTypesPanel, BoxLayout.Y_AXIS));
visTypesPanel.setAlignmentX(0.0f);
visTypesPanel.setBackground(metaControlsColor);
TitledBorder t1 = BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
"visualization type");
t1.setTitleJustification(TitledBorder.CENTER);
visTypesPanel.setBorder(t1);
String[] rendererStrings = {"segment order", "scatterplot", "bar graph", "line graph"};
rendererSelector = new JComboBox(rendererStrings);
rendererSelector.setMaximumSize(rendererSelector.getPreferredSize());
rendererSelector.setBackground(metaControlsColor);
rendererSelector.setActionCommand("rendererSelector");
rendererSelector.addActionListener(this);
visTypesPanel.add(rendererSelector);
metaControlPanel.add(visTypesPanel);
/*
* load files
*/
JPanel fileIOPanel = new JPanel();
fileIOPanel.setLayout(new BoxLayout(fileIOPanel, BoxLayout.Y_AXIS));
fileIOPanel.setAlignmentX(0.0f);
fileIOPanel.setBackground(metaControlsColor);
TitledBorder t2 = BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
"file I/O");
t2.setTitleJustification(TitledBorder.CENTER);
fileIOPanel.setBorder(t2);
featInputFileLabel = new JLabel("no file loaded");
featInputFileLabel.setBackground(metaControlsColor);
fileIOPanel.add(featInputFileLabel);
eDLInputFileLabel = new JLabel("no file loaded");
eDLInputFileLabel.setBackground(metaControlsColor);
fileIOPanel.add(eDLInputFileLabel);
JButton selectFeatsButton = new JButton("load files");
selectFeatsButton.setBackground(metaControlsColor);
selectFeatsButton.setActionCommand("selectFiles");
selectFeatsButton.addActionListener(this);
fileIOPanel.add(selectFeatsButton);
JLabel featOutputFileLabel =
new JLabel("save selected chunks");
featOutputFileLabel.setBackground(metaControlsColor);
fileIOPanel.add(featOutputFileLabel);
JButton selectFeatOutputButton = new JButton("save .feat");
selectFeatOutputButton.setBackground(metaControlsColor);
selectFeatOutputButton.setActionCommand("saveFeatFile");
selectFeatOutputButton.addActionListener(this);
fileIOPanel.add(selectFeatOutputButton);
JButton selectEDLOutputButton = new JButton("save .edl");
selectEDLOutputButton.setBackground(metaControlsColor);
selectEDLOutputButton.setActionCommand("saveEDLFile");
selectEDLOutputButton.addActionListener(this);
fileIOPanel.add(selectEDLOutputButton);
metaControlPanel.add(fileIOPanel);
/*
* audio playback
*/
JPanel audioPanel = new JPanel();
audioPanel.setLayout(new BoxLayout(audioPanel, BoxLayout.Y_AXIS));
audioPanel.setAlignmentX(0.0f);
audioPanel.setBackground(metaControlsColor);
TitledBorder t3 = BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
"synthesizer");
t3.setTitleJustification(TitledBorder.CENTER);
audioPanel.setBorder(t3);
playFeatChunksButton = new JRadioButton("play feat chunks");
playFeatChunksButton.setBackground(metaControlsColor);
playFeatChunksButton.setSelected(true);
playFeatChunksButton.setEnabled(false);
audioPanel.add(playFeatChunksButton);
playEDLChunksButton = new JRadioButton("play edl chunks");
playEDLChunksButton.setBackground(metaControlsColor);
playEDLChunksButton.setEnabled(false);
audioPanel.add(playEDLChunksButton);
playAddBlipsButton = new JCheckBox("add blips");
playAddBlipsButton.setBackground(metaControlsColor);
playAddBlipsButton.setEnabled(true);
audioPanel.add(playAddBlipsButton);
ButtonGroup playTypeBG = new ButtonGroup();
playTypeBG.add(playFeatChunksButton);
playTypeBG.add(playEDLChunksButton);
JButton playButton = new JButton("play selected");
playButton.setBackground(metaControlsColor);
playButton.setActionCommand("playChunks");
playButton.addActionListener(this);
audioPanel.add(playButton);
JButton stopButton = new JButton("stop");
stopButton.setBackground(metaControlsColor);
stopButton.setActionCommand("stopPlayback");
stopButton.addActionListener(this);
audioPanel.add(stopButton);
metaControlPanel.add(audioPanel);
updateFileNameLabels();
/*
* standard info display
*/
JPanel infoDisplayPanel = new JPanel();
infoDisplayPanel.setLayout(new BoxLayout(infoDisplayPanel, BoxLayout.Y_AXIS));
infoDisplayPanel.setBackground(metaControlsColor);
infoDisplayPanel.setBounds(visTypesPanel.getBounds());
TitledBorder t4 = BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
"chunk data");
t4.setTitleJustification(TitledBorder.CENTER);
infoDisplayPanel.setBorder(t4);
JLabel iL1 = new JLabel("file name:");
infoDisplayPanel.add(iL1);