Author: akuchinsky
Date: 2008-09-11 13:15:16 -0700 (Thu, 11 Sep 2008)
New Revision: 14889

Modified:
   
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
Log:
returns from mouseDragged, mouseReleased events if shift is not being held down.

Modified: 
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
===================================================================
--- 
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
   2008-09-11 19:33:21 UTC (rev 14888)
+++ 
csplugins/trunk/agilent/kuchinsky/BubbleRouter/src/cytoscape/bubbleRouter/BubbleRouterPlugin.java
   2008-09-11 20:15:16 UTC (rev 14889)
@@ -335,7 +335,7 @@
                CyGroupManager.registerGroupViewer(this);
 
                // Load .na file(s) from jar
-               // preloadCellularComponents();
+               // preloadCellularComponents(); 
        }
 
        /**
@@ -443,6 +443,8 @@
         * @see 
java.awt.event.MouseMotionListener#mouseDragged(java.awt.event.MouseEvent)
         */
        public void mouseDragged(MouseEvent e) {
+               
+               if (!e.isShiftDown()) { return; }
 
                onEdge = calculateOnEdge(e.getPoint(), pickedRegion);
 
@@ -497,6 +499,7 @@
                        edgeBeingStretched = onEdge;
 
                        // Don't draw rectangle or make selection during stretch
+                       
                        ((DGraphView) 
Cytoscape.getCurrentNetworkView()).getCanvas()
                                        .setSelecting(false);
                        ((DGraphView) Cytoscape.getCurrentNetworkView())
@@ -516,6 +519,9 @@
         * @see 
java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
         */
        public void mouseReleased(MouseEvent e) {
+               
+               if (!e.isShiftDown()) { return; }
+               
                if (dragging) {
                        dragging = false;
                        drawRectRegion();
@@ -1068,7 +1074,7 @@
 
        /**
         * This is called when a group we care about is about to be deleted. If 
we
-        * weren't building our menu each time, this would be used to update the
+        * weren't building our menu each time, this would be used  to update 
the
         * list of groups we present to the user.
         * 
         * @param group
@@ -1115,7 +1121,10 @@
                                + "_"
                                + LayoutRegionManager.getIdForView(Cytoscape
                                                .getCurrentNetworkView())));
-               group.setState(SELECTED);
+               if (group != null) 
+               {
+                       group.setState(SELECTED);
+               }
        }
 
        /**
@@ -1127,7 +1136,10 @@
                                + "_"
                                + LayoutRegionManager.getIdForView(Cytoscape
                                                .getCurrentNetworkView())));
-               group.setState(UNSELECTED);
+               if (group != null)
+               {
+                       group.setState(UNSELECTED);
+               }
        }
 
        /**


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to