Ignore:
Timestamp:
01/21/20 09:49:32 (4 years ago)
Author:
bnemhaus
Message:

org.expeditee.gio.gesture.ExpediteeKBMGestureTranslator ->
org.expeditee.gio.gesture.StandardGestureActions ->
org.expeditee.gui.Frame ->
org.expeditee.gui.ItemsList ->

Added debug gesutre that prints out body, primary and surrogates before and after a reparse. Ran with command Ctrl + Shift + R

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gio/gesture/ExpediteeKBMGestureTranslator.java

    r1458 r1502  
    12681268                                }
    12691269                               
     1270                                // CTRL + SHIFT + R is the reparse frame body event
     1271                                if (kbmTranslator.isKeyDown(Key.SHIFT)) {
     1272                                        return null;
     1273                                }
     1274                               
    12701275                                // Must be pressing R to justify
    12711276                                if (kbmEvent.getKeyDown() != KBMInputEvent.Key.R) {
     
    12751280                                // Return the gesture
    12761281                                return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.JUSTIFY), new JustifyGestureData(true));
     1282                        }
     1283                });
     1284               
     1285                // Add the CTRL + SHIFT + R -> REPARSE FRAME BODY gesture recogniser
     1286                addTranslator(new InputEventToGestureTranslator(InputType.KBM)
     1287                {
     1288                        @Override
     1289                        public String details() { return "CTRL + SHIFT + R -> REPARSE FRAME BODY"; }
     1290
     1291                        @Override
     1292                        public List<Gesture> onInputEvent(InputEvent event) {
     1293                                // Cast to keyboard/mouse event
     1294                                KBMInputEvent kbmEvent = (KBMInputEvent) event;
     1295                               
     1296                                // Check that ctrl is down
     1297                                if (!kbmTranslator.isKeyDown(Key.CTRL)) {
     1298                                        return null;
     1299                                }
     1300                               
     1301                                // CTRL + SHIFT + R is the reparse frame body event
     1302                                if (!kbmTranslator.isKeyDown(Key.SHIFT)) {
     1303                                        return null;
     1304                                }
     1305                               
     1306                                // Must be pressing R to justify
     1307                                if (kbmEvent.getKeyDown() != KBMInputEvent.Key.R) {
     1308                                        return null;
     1309                                }
     1310                               
     1311                                // Return the gesture
     1312                                return Gesture.single(StandardGestureActions.getInstance().gestureType(StandardGestureType.REPARSE), null);
    12771313                        }
    12781314                });
Note: See TracChangeset for help on using the changeset viewer.