use of org.eclipse.swtchart.ICustomPaintListener in project tracecompass by tracecompass.
the class TmfBaseProvider method deregister.
/**
* Method to deregister the provider from chart viewer.
*/
protected void deregister() {
IPlotArea plotArea = getChart().getPlotArea();
if (plotArea == null) {
return;
}
Control control = plotArea.getControl();
if (!control.isDisposed()) {
if (this instanceof MouseListener) {
control.removeMouseListener((MouseListener) this);
}
if (this instanceof MouseMoveListener) {
control.removeMouseMoveListener((MouseMoveListener) this);
}
if (this instanceof MouseWheelListener) {
control.removeMouseWheelListener((MouseWheelListener) this);
}
if (this instanceof MouseTrackListener) {
control.removeMouseTrackListener((MouseTrackListener) this);
}
if (this instanceof ICustomPaintListener) {
plotArea.removeCustomPaintListener((ICustomPaintListener) this);
} else if (this instanceof PaintListener) {
control.removePaintListener((PaintListener) this);
}
TmfAbstractToolTipHandler tooltipHandler = getTooltipHandler();
if (tooltipHandler != null) {
tooltipHandler.deactivateHoverHelp(control);
}
}
}
Aggregations