File tree Expand file tree Collapse file tree 11 files changed +16
-15
lines changed
visualvm/libs.profiler/lib.profiler.ui/src/org/graalvm/visualvm/lib/ui Expand file tree Collapse file tree 11 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public void mousePressed(MouseEvent mouseEvent) {
116
116
}
117
117
118
118
public void mouseClicked (MouseEvent mouseEvent ) {
119
- if (( mouseEvent . getModifiers () == InputEvent . BUTTON1_MASK ) && (!internalCornerButtonClick )) {
119
+ if (SwingUtilities . isLeftMouseButton ( mouseEvent ) && (!internalCornerButtonClick )) {
120
120
showColumnSelectionPopup (headerPopup , cornerButton );
121
121
}
122
122
}
Original file line number Diff line number Diff line change 60
60
import javax .swing .JLabel ;
61
61
import javax .swing .JPanel ;
62
62
import javax .swing .JToggleButton ;
63
+ import javax .swing .SwingUtilities ;
63
64
import javax .swing .UIManager ;
64
65
import javax .swing .border .BevelBorder ;
65
66
import javax .swing .border .Border ;
@@ -145,7 +146,7 @@ private class DoubleClickListener extends MouseAdapter {
145
146
//~ Methods --------------------------------------------------------------------------------------------------------------
146
147
147
148
public void mouseClicked (MouseEvent e ) {
148
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
149
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
149
150
if (isMaximized ()) {
150
151
restore ();
151
152
} else {
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ private class TableHeaderListener extends MouseAdapter implements MouseMotionLis
185
185
* If new sorting column is selected, the appropriate sorting order for column's datatype is set.
186
186
*/
187
187
public void mouseClicked (MouseEvent e ) {
188
- if (e . getModifiers () == InputEvent . BUTTON1_MASK ) {
188
+ if (SwingUtilities . isLeftMouseButton ( e ) ) {
189
189
int column = tableHeader .columnAtPoint (e .getPoint ());
190
190
int sortingColumn = headerRenderer .getSortingColumn ();
191
191
@@ -229,7 +229,7 @@ public void mouseMoved(MouseEvent e) {
229
229
* Here the active header button is programatically pressed
230
230
*/
231
231
public void mousePressed (MouseEvent e ) {
232
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (tableHeader .getResizingColumn () == null )) {
232
+ if (SwingUtilities . isLeftMouseButton ( e ) && (tableHeader .getResizingColumn () == null )) {
233
233
headerRenderer .setPressedColumn (tableHeader .columnAtPoint (e .getPoint ()));
234
234
tableHeader .repaint ();
235
235
}
@@ -239,7 +239,7 @@ public void mousePressed(MouseEvent e) {
239
239
* Here the active header button is programatically released
240
240
*/
241
241
public void mouseReleased (MouseEvent e ) {
242
- if (e . getModifiers () == InputEvent . BUTTON1_MASK ) {
242
+ if (SwingUtilities . isLeftMouseButton ( e ) ) {
243
243
headerRenderer .setPressedColumn (-1 );
244
244
tableHeader .repaint ();
245
245
}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ private class HeaderListener extends MouseAdapter implements MouseMotionListener
59
59
* If new sorting column is selected, the appropriate sorting order for column's datatype is set.
60
60
*/
61
61
public void mouseClicked (MouseEvent e ) {
62
- if (e . getModifiers () == InputEvent . BUTTON1_MASK ) {
62
+ if (SwingUtilities . isLeftMouseButton ( e ) ) {
63
63
int column = tableHeader .columnAtPoint (e .getPoint ());
64
64
int sortingColumn = headerRenderer .getSortingColumn ();
65
65
@@ -97,7 +97,7 @@ public void mouseMoved(MouseEvent e) {
97
97
* Here the active header button is programatically pressed
98
98
*/
99
99
public void mousePressed (MouseEvent e ) {
100
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (tableHeader .getResizingColumn () == null )) {
100
+ if (SwingUtilities . isLeftMouseButton ( e ) && (tableHeader .getResizingColumn () == null )) {
101
101
headerRenderer .setPressedColumn (tableHeader .columnAtPoint (e .getPoint ()));
102
102
tableHeader .repaint ();
103
103
}
@@ -107,7 +107,7 @@ public void mousePressed(MouseEvent e) {
107
107
* Here the active header button is programatically released
108
108
*/
109
109
public void mouseReleased (MouseEvent e ) {
110
- if (e . getModifiers () == InputEvent . BUTTON1_MASK ) {
110
+ if (SwingUtilities . isLeftMouseButton ( e ) ) {
111
111
headerRenderer .setPressedColumn (-1 );
112
112
tableHeader .repaint ();
113
113
}
Original file line number Diff line number Diff line change @@ -603,7 +603,7 @@ public void mouseClicked(MouseEvent e) {
603
603
if (popupPath != null ) {
604
604
treeTable .getTree ().setSelectionPath (popupPath );
605
605
606
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
606
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
607
607
if (treeTableModel .isLeaf (popupPath .getPath ()[popupPath .getPath ().length - 1 ])) {
608
608
showSourceForMethod (popupPath );
609
609
}
Original file line number Diff line number Diff line change @@ -886,7 +886,7 @@ public void mouseClicked(MouseEvent e) {
886
886
resTable .getSelectionModel ().setSelectionInterval (line , line );
887
887
methodId = flatProfileContainer .getMethodIdAtRow (line );
888
888
889
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
889
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
890
890
showSourceForMethod (methodId );
891
891
}
892
892
}
Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ public void mouseClicked(MouseEvent e) {
546
546
547
547
if (popupPath != null ) {
548
548
treeTable .getTree ().setSelectionPath (popupPath );
549
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
549
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
550
550
if (treeTableModel .isLeaf (popupPath .getPath ()[popupPath .getPath ().length - 1 ])) {
551
551
showSourceForMethod (popupPath );
552
552
}
Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ public void mouseClicked(MouseEvent e) {
547
547
548
548
if (popupPath != null ) {
549
549
treeTable .getTree ().setSelectionPath (popupPath );
550
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
550
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
551
551
if (treeTableModel .isLeaf (popupPath .getPath ()[popupPath .getPath ().length - 1 ])) {
552
552
showSourceForMethod (popupPath );
553
553
}
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ public void mouseClicked(MouseEvent e) {
307
307
308
308
if (treePath != null ) {
309
309
treeTable .getTree ().setSelectionPath (treePath );
310
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
310
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
311
311
if (treeTableModel .isLeaf (treePath .getPath ()[treePath .getPath ().length - 1 ])) {
312
312
performDefaultAction (treePath );
313
313
}
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ public void mouseClicked(MouseEvent e) {
248
248
//selectedClassId = sortedClassIds[clickedLine];
249
249
selectedClassId = sortedClassIds [((Integer ) filteredToFullIndexes .get (clickedLine )).intValue ()];
250
250
251
- if (( e . getModifiers () == InputEvent . BUTTON1_MASK ) && (e .getClickCount () == 2 )) {
251
+ if (SwingUtilities . isLeftMouseButton ( e ) && (e .getClickCount () == 2 )) {
252
252
performDefaultAction (selectedClassId );
253
253
}
254
254
}
You can’t perform that action at this time.
0 commit comments