added if to tool tip generator
@@ -26,6 +26,7 @@ import net.sf.mzmine.datamodel.IsotopePattern;
import net.sf.mzmine.datamodel.PeakList;
import net.sf.mzmine.datamodel.PeakListRow;
import net.sf.mzmine.main.MZmineCore;
+import net.sf.mzmine.modules.visualization.spectra.datasets.ExtendedIsotopePatternDataSet;
import net.sf.mzmine.modules.visualization.spectra.datasets.IsotopesDataSet;
import net.sf.mzmine.modules.visualization.spectra.datasets.PeakListDataSet;
@@ -83,10 +84,21 @@ class SpectraToolTipGenerator implements XYToolTipGenerator {
}
+ if (dataset instanceof ExtendedIsotopePatternDataSet) {
+ return "Isotope pattern: "
+ + ((ExtendedIsotopePatternDataSet) dataset).getIsotopePattern().getDescription()
+ + "\nm/z: " + mzFormat.format(mzValue) + "\nIdentity: "
+ + ((ExtendedIsotopePatternDataSet) dataset).getItemDescription(series, item)
+ + "\nRelative intensity: "
+ + percentFormat.format((dataset.getY(series, item).doubleValue() * 100)) + "%";
+ }
+
String tooltip =
"m/z: " + mzFormat.format(mzValue) + "\nIntensity: " + intensityFormat.format(intValue);
return tooltip;
}
+
+
}
