Recalling this topic is because I just created two parts for mass spectrum profile, and found org.eclipse.chemclipse.msd.swt.ui.components.AbstractProfileMassSpectrumUI class overwrote mouseDoubleClick(), mouseDown() and mouseUp() methods with empty. Tracing it up, I found the empty implementation of mouseDoubleClick() in super class of org.eclipse.chemclipse.thirdpartylibraries.swtchart.ext.InteractiveChartExtended.
How about assign it to resetting plot to 1:1?
It just needs adding one line into the method:
adjustRange();
as the same action as popup menu does:
if(menuItem.getText().equals(ADJUST_AXIS_RANGE)) { // "Reset 1:1"
adjustRange();
}
My two parts extent org.eclipse.chemclipse.msd.swt.ui.components.AbstractProfileMassSpectrumUI. To enable mouse gestures on the profile plot, I have to borrow the mouseDown()&mouseUp() implementations from AbstractProfileMassSpectrumUI's super class InteractiveChartExtended.
I also redefine the selection rectangle and extent it's range to (startPoint.x, getClientArea().y, endPoint.x, getClientArea().y+getClientArea().height).
The details can be found in cn.edu.xmu.tidems.control.ui.views.components.AbstractProfileMassSpectrumUITideMS.