super.actionPerformed(event);
Object src = event.getSource();
if (src == comboPeakList) {
PeakList selectedPeakList = (PeakList) comboPeakList
.getSelectedItem();
PeakListRow rows[] = selectedPeakList.getRows();
comboPeak.removeActionListener(this);
comboPeak.removeAllItems();
for (PeakListRow row : rows) {
comboPeak.addItem(row);
}
comboPeak.addActionListener(this);
comboPeak.setSelectedIndex(0);
return;
}
if (src == preview) {
if (preview.isSelected()) {
// Set the height of the preview to 200 cells, so it will span
// the whole vertical length of the dialog (buttons are at row
// no
// 100). Also, we set the weight to 10, so the preview component
// will consume most of the extra available space.
mainPanel.add(pnlPlotXY, 3, 0, 1, 200, 10, 10);
pnlVisible.add(pnlLabelsFields, BorderLayout.CENTER);
updateMinimumSize();
pack();
PeakList selected[] = MZmineCore.getDesktop()
.getSelectedPeakLists();
if (selected.length > 0)
comboPeakList.setSelectedItem(selected[0]);
else
comboPeakList.setSelectedIndex(0);