Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r1258 - trunk/src/org/tigris/gef/base/ModeSelect.java

gef
Discussion topic

Back to topic list

svn commit: r1258 - trunk/src/org/tigris/gef/base/ModeSelect.java

Author mvw
Full name Michiel van der Wulp
Date 2009-08-17 05:22:47 PDT
Message Author: mvw
Date: 2009-08-17 05:22:47-0700
New Revision: 1258

Modified:
   trunk/src/org/tigris​/gef/base/ModeSelect​.java

Log:
Follow up on GEF issue 317 / ArgoUML issue 2190: Move the broom function from shift-click to alt-click.
Documented the new behaviour in the manual, and made the broom also appear with ALT-GR.

Modified: trunk/src/org/tigris​/gef/base/ModeSelect​.java
Url: http://gef.tigris.or​g/source/browse/gef/​trunk/src/org/tigris​/gef/base/ModeSelect​.java?view=diff&​pathrev=1258&r1=​1257&r2=1258
====================​====================​====================​==================
--- trunk/src/org/tigris​/gef/base/ModeSelect​.java (original)
+++ trunk/src/org/tigris​/gef/base/ModeSelect​.java 2009-08-17 05:22:47-0700
@@ -32,12 +32,12 @@
 import java.awt.Rectangle;
 import java.awt.event.InputEvent;
 import java.awt.event.MouseEvent;
-
 import java.util.Enumeration;
 import java.util.Vector;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.l​ogging.LogFactory;
+
 import org.tigris.gef.prese​ntation.Fig;
 import org.tigris.gef.prese​ntation.FigGroup;
 import org.tigris.gef.prese​ntation.Handle;
@@ -47,6 +47,7 @@
  * more Figs. Clicking on a Fig will select it. Shift-clicking will toggle
  * whether it is selected. Control-clicking will toggle
  * whether it is selected. Alt-clicking will start the broom (ModeBroom).
+ * Alt-Gr-clicking also invokes the broom.
  * Dragging in open space will draw a selection
  * rectangle. Dragging on a Fig will switch to ModeModify. Dragging from a port
  * will switch to ModeCreateEdge. ModeSelect paints itself by displaying its
@@ -120,12 +121,15 @@
 
         int onmask = MouseEvent.BUTTON1_DOWN_MASK
             | MouseEvent.ALT_DOWN_MASK;
+ int onmask2 = MouseEvent.BUTTON1_DOWN_MASK
+ | MouseEvent.ALT_GRAPH_DOWN_MASK;
         int offmask = MouseEvent.BUTTON2_DOWN_MASK
             | MouseEvent.BUTTON3_DOWN_MASK
             | MouseEvent.CTRL_DOWN_MASK;
         /* The broom uses the shift key to adapt its functionality,
          * so it is not checked here.*/
- if ((me.getModifiersEx() & (onmask | offmask)) == onmask) {
+ if (((me.getModifiersEx() & (onmask | offmask)) == onmask)
+ || ((me.getModifiersEx() & (onmask2 | offmask)) == onmask2)){
             gotoBroomMode(me);
             if (LOG.isDebugEnabled())
                 LOG.debug("MousePressed with alt key pressed");

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r1258 - trunk/src/org/tigris/gef/base/ModeSelect.java mvw Michiel van der Wulp 2009-08-17 05:22:47 PDT
Messages per page: