Skip to content
Snippets Groups Projects
Commit ea3b3533 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

better highlight coefficient management

parent 3ba8638c
Branches
Tags
No related merge requests found
......@@ -27,8 +27,9 @@ import fr.soleil.lib.project.ObjectUtils;
public class ChartSpectrumItem extends AbstractItem {
private final Set<IChartSpectrumItemListener> chartSpectrumItemListeners;
private static final double HIGHLIGHT_COEFFICIENT = 3;
private final Set<IChartSpectrumItemListener> chartSpectrumItemListeners;
private final WeakReference<ChartSpectrumViewer> chartSpectrumViewerRef;
private DataBrowserController controller;
......@@ -46,7 +47,6 @@ public class ChartSpectrumItem extends AbstractItem {
super(item, controller);
this.chartSpectrumViewerRef = chartSpectrumViewer == null ? null : new WeakReference<>(chartSpectrumViewer);
;
this.controller = controller;
this.markerEnabled = markerEnabled;
......@@ -262,7 +262,7 @@ public class ChartSpectrumItem extends AbstractItem {
highlightMethod = chartViewer.getDataViewHighlightMethod(readId);
}
if (selected) {
chartViewer.setDataViewHighlightCoefficient(readId, 1);
chartViewer.setDataViewHighlightCoefficient(readId, HIGHLIGHT_COEFFICIENT);
chartViewer.setDataViewHighlightMethod(readId, IChartViewer.HIGHLIGHT_ADD);
} else {
chartViewer.setDataViewHighlightCoefficient(readId, highlightCoeff);
......@@ -287,7 +287,7 @@ public class ChartSpectrumItem extends AbstractItem {
highlightMethod = chartViewer.getDataViewHighlightMethod(readDataViewId);
}
if (selected) {
chartViewer.setDataViewHighlightCoefficient(readDataViewId, 1);
chartViewer.setDataViewHighlightCoefficient(readDataViewId, HIGHLIGHT_COEFFICIENT);
chartViewer.setDataViewHighlightMethod(readDataViewId, IChartViewer.HIGHLIGHT_ADD);
} else {
chartViewer.setDataViewHighlightCoefficient(readDataViewId, highlightCoeff);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment