Author: pwang
Date: 2012-06-18 14:41:53 -0700 (Mon, 18 Jun 2012)
New Revision: 29608
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
Log:
Change the way to trigger the popup menu on Windows
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
2012-06-18 21:35:37 UTC (rev 29607)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/NetworkPanel.java
2012-06-18 21:41:53 UTC (rev 29608)
@@ -672,23 +672,20 @@
maybeShowPopup(e);
}
+ // On Windows, popup is triggered by mouse release, not press
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ maybeShowPopup(e);
+ }
+
/**
* if the mouse press is of the correct type, this function
will maybe
* display the popup
*/
private final void maybeShowPopup(final MouseEvent e) {
- // Note: e.isPopupTrigger() always returns false on
Windows, so we make Windows OS an exception
- boolean isWinOS = false;
- boolean isRightClick_WinOS = false;
- if
(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0){
- isWinOS = true;
- }
- if ((isWinOS && e.getButton() != MouseEvent.BUTTON3))
- return;
-
// Ignore if not valid trigger.
- if (!e.isPopupTrigger() && !isWinOS)
+ if (!e.isPopupTrigger())
return;
// get the row where the mouse-click originated
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.