@@ -630,14 +630,15 @@ public void paint(Graphics gcomp) {
630
630
linkedLegendPanel .note (i );
631
631
}
632
632
getPlot (i ).note (draw );
633
- if (allowNoteCoord && coordNoted != null ) {
634
- getPlot (i ).noteCoord (draw , coordNoted );
635
- }
636
633
//return;
637
634
}
635
+ if (allowNoteCoord && coordNoted != null ) {
636
+ getPlot (i ).noteCoord (draw , coordNoted );
637
+ }
638
638
}
639
639
}
640
640
}
641
+
641
642
// ///////////////////////////////////////////
642
643
// ////// Listeners //////////////////////////
643
644
// ///////////////////////////////////////////
@@ -715,14 +716,15 @@ public void mouseReleased(MouseEvent e) {
715
716
if (abs (mouseCurent [0 ] - mouseClick [0 ]) > 10 && abs (mouseCurent [1 ] - mouseClick [1 ]) > 10 ) {
716
717
int [] origin = {min (mouseClick [0 ], mouseCurent [0 ]), min (mouseClick [1 ], mouseCurent [1 ])};
717
718
double [] ratio = {abs ((double ) (mouseCurent [0 ] - mouseClick [0 ]) / (double ) getWidth ()),
718
- abs ((double ) (mouseCurent [1 ] - mouseClick [1 ]) / (double ) getHeight ())
719
+ abs ((double ) (mouseCurent [1 ] - mouseClick [1 ]) / (double ) getHeight ())
719
720
};
720
721
draw .dilate (origin , ratio );
721
722
repaint ();
722
723
}
723
724
break ;
724
725
}
725
726
//repaint();
727
+ dragging = false ;
726
728
}
727
729
728
730
public void mouseClicked (MouseEvent e ) {
@@ -835,21 +837,21 @@ public void mouseWheelMoved(MouseWheelEvent e) {
835
837
int [] origin ;
836
838
double [] ratio ;
837
839
// double factor = 1.5;
838
- switch (ActionMode ) {
839
- case ZOOM :
840
- if (e .getWheelRotation () == -1 ) {
841
- origin = new int []{(int ) (mouseCurent [0 ] - getWidth () / 3 /* (2*factor) */ ), (int ) (mouseCurent [1 ] - getHeight () / 3 /* (2*factor) */ )};
842
- ratio = new double []{0.666 /* 1/factor, 1/factor */ , 0.666 };
843
- } else {
844
- origin = new int []{(int ) (mouseCurent [0 ] - getWidth () / 1.333 /* (2/factor) */ ),
845
- (int ) (mouseCurent [1 ] - getHeight () / 1.333 /* (2/factor) */ )
846
- };
847
- ratio = new double []{1.5 , 1.5 /* factor, factor */ };
848
- }
849
- draw .dilate (origin , ratio );
850
- repaint ();
851
- break ;
840
+ //switch (ActionMode) {
841
+ // case ZOOM:
842
+ if (e .getWheelRotation () == -1 ) {
843
+ origin = new int []{(int ) (mouseCurent [0 ] - getWidth () / 3 /* (2*factor) */ ), (int ) (mouseCurent [1 ] - getHeight () / 3 /* (2*factor) */ )};
844
+ ratio = new double []{0.666 /* 1/factor, 1/factor */ , 0.666 };
845
+ } else {
846
+ origin = new int []{(int ) (mouseCurent [0 ] - getWidth () / 1.333 /* (2/factor) */ ),
847
+ (int ) (mouseCurent [1 ] - getHeight () / 1.333 /* (2/factor) */ )
848
+ };
849
+ ratio = new double []{1.5 , 1.5 /* factor, factor */ };
852
850
}
851
+ draw .dilate (origin , ratio );
852
+ repaint ();
853
+ // break;
854
+ //}
853
855
}
854
856
855
857
public void componentHidden (ComponentEvent e ) {
0 commit comments