use of net.sf.mzmine.modules.peaklistmethods.peakpicking.deconvolution.PeakPreviewComboRenderer in project mzmine2 by mzmine.
the class ShapeModelerSetupDialog method addComponents.
/**
* This function add all the additional components for this dialog over the original
* ParameterSetupDialog.
*/
private void addComponents() {
PeakList[] peakLists = MZmineCore.getProjectManager().getCurrentProject().getPeakLists();
// Elements of pnlpreview
JPanel pnlpreview = new JPanel(new BorderLayout());
preview = new JCheckBox(" Show preview of peak building ");
preview.addActionListener(this);
preview.setHorizontalAlignment(SwingConstants.CENTER);
preview.setEnabled(peakLists.length > 0);
pnlpreview.add(new JSeparator(), BorderLayout.NORTH);
pnlpreview.add(preview, BorderLayout.CENTER);
pnlpreview.add(Box.createVerticalStrut(10), BorderLayout.SOUTH);
JComponent[] tableComponents = new JComponent[4];
tableComponents[0] = new JLabel("Feature list");
comboPeakList = new JComboBox<PeakList>();
for (PeakList peakList : peakLists) {
comboPeakList.addItem(peakList);
}
comboPeakList.setFont(comboFont);
comboPeakList.addActionListener(this);
tableComponents[1] = comboPeakList;
comboPeak = new JComboBox<PeakListRow>();
comboPeak.setFont(comboFont);
comboPeak.setRenderer(new PeakPreviewComboRenderer());
tableComponents[2] = new JLabel("Peak");
tableComponents[3] = comboPeak;
pnlLabelsFields = GUIUtils.makeTablePanel(2, 2, tableComponents);
// Put all together
pnlVisible = new JPanel(new BorderLayout());
pnlVisible.add(pnlpreview, BorderLayout.NORTH);
// Panel for XYPlot
pnlPlotXY = new JPanel(new BorderLayout());
GUIUtils.addMarginAndBorder(pnlPlotXY, 10);
pnlPlotXY.setBackground(Color.white);
ticPlot = new TICPlot((ActionListener) this);
pnlPlotXY.add(ticPlot, BorderLayout.CENTER);
toolBar = new TICToolBar(ticPlot);
toolBar.getComponentAtIndex(0).setVisible(false);
pnlPlotXY.add(toolBar, BorderLayout.EAST);
mainPanel.add(pnlVisible, 0, getNumberOfParameters() + 3, 3, 1, 0, 0);
updateMinimumSize();
pack();
setLocationRelativeTo(MZmineCore.getDesktop().getMainWindow());
}
Aggregations