use of net.sf.mzmine.util.scans.sorting.ScanSortMode in project mzmine2 by mzmine.
the class MSMSLibrarySubmissionWindow method addListener.
private void addListener() {
// listen for changes in masslist selection and preprocessing
MassListComponent mc = getMassListComponent();
mc.addDocumentListener(new DelayedDocumentListener(e -> updateSettingsOnAllSelectors()));
DoubleComponent nc = getNoiseLevelComponent();
nc.addDocumentListener(new DelayedDocumentListener(e -> updateSettingsOnAllSelectors()));
IntegerComponent minc = getMinSignalComponent();
minc.addDocumentListener(new DelayedDocumentListener(e -> updateSettingsOnAllSelectors()));
ComboComponent<ScanSortMode> sortc = getComboSortMode();
sortc.addItemListener(e -> updateSortModeOnAllSelectors());
IntegerComponent mslevel = getMSLevelComponent();
mslevel.addDocumentListener(new DelayedDocumentListener(e -> {
updateParameterSetFromComponents();
Integer level = paramMeta.getParameter(LibraryMetaDataParameters.MS_LEVEL).getValue();
setFragmentScan(level != null && level > 1);
}));
}
use of net.sf.mzmine.util.scans.sorting.ScanSortMode in project mzmine2 by mzmine.
the class MSMSLibrarySubmissionWindow method updateAllChartSelectors.
/**
* Create new scan selector panels
*/
public void updateAllChartSelectors() {
group = new ChartGroup(showCrosshair, showCrosshair, true, false);
pnCharts.removeAll();
GridLayout layout = new GridLayout(0, 1);
pnCharts.setLayout(layout);
if (checkInput()) {
Integer minSignals = paramSubmit.getParameter(LibrarySubmitParameters.minSignals).getValue();
Double noiseLevel = paramSubmit.getParameter(LibrarySubmitParameters.noiseLevel).getValue();
String massListName = paramSubmit.getParameter(LibrarySubmitParameters.massList).getValue();
if (minSignals != null && noiseLevel != null && massListName != null) {
ScanSortMode sort = (ScanSortMode) getComboSortMode().getSelectedItem();
if (rows != null) {
// create MS2 of all rows
for (int i = 0; i < rows.length; i++) {
PeakListRow row = rows[i];
ScanSelectPanel pn = new ScanSelectPanel(row, sort, noiseLevel, minSignals, massListName);
pnScanSelect[i] = pn;
pn.addChartChangedListener(chart -> regroupCharts());
pnCharts.add(pn);
// add to group
EChartPanel c = pn.getChart();
if (c != null) {
group.add(new ChartViewWrapper(c));
}
}
} else if (scanList != null) {
// all selectors of scanlist
for (int i = 0; i < scanList.size(); i++) {
Scan[] scansEntry = scanList.get(i);
ScanSelectPanel pn = new ScanSelectPanel(scansEntry, sort, noiseLevel, minSignals, massListName);
pnScanSelect[i] = pn;
pn.addChartChangedListener(chart -> regroupCharts());
pnCharts.add(pn);
// add to group
EChartPanel c = pn.getChart();
if (c != null) {
group.add(new ChartViewWrapper(c));
}
}
}
}
streamSelection().forEach(pn -> {
pn.setFragmentScan(isFragmentScan);
// only show exclude/check button if more than 1 entry
pn.setShowExcludeButton(pnScanSelect.length > 1);
});
}
pnCharts.revalidate();
pnCharts.repaint();
}
Aggregations