protected static final int SELECTION_MARKER_INDEX = 0;
private static final int SCREENSHOT_DOT_WIDTH = 12;
-
+ private boolean abnormalClicked = true;
+
public TimelineChartMouseEventListener(DAPopupMenu menu, DATimeline timeline, String pageID) {
this.menu = menu;
this.timeline = timeline;
DAChartPlotIntervalMarker intervalMarker = (DAChartPlotIntervalMarker) marker;
double eventTime = plot.getXFromXPixel(e.x);
-
+
+ /// abnormal click don't have mouse_up
+ abnormalClicked = false;
+
if (e.button == 3) {
List<DAPopupMenuItem> itemList = menu.getItems();
for(DAPopupMenuItem item : itemList) {
@Override
public void mouseUp(MouseEvent e) {
- if (e.button == 3) {
+ int clickcount = e.count;
+
+ if (e.button == 3 || abnormalClicked == true) {
+ return;
+ }
+ /// second click is need to go double click event.
+ if(clickcount == 2){
return;
}
@Override
public void mouseMove(MouseEvent e) {
+ /// don't have mouse up click event is abnormal.
+ if(abnormalClicked) {
+ return;
+ }
DAChart chart = (DAChart) e.widget;
DAChartPlot plot = chart.getPlot();
DAChartPlotMarker marker = plot.getMarkers().get(SELECTION_MARKER_INDEX);