- Timestamp:
- 07/24/19 11:23:45 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java
r1413 r1415 54 54 import org.expeditee.gui.FreeItems; 55 55 import org.expeditee.gui.MessageBay; 56 import org.expeditee.gui.ItemsList; 56 57 import org.expeditee.gui.Vector; 57 58 import org.expeditee.io.ExpClipReader; … … 123 124 TOGGLE_ITEMS_MARK, // Show/hide the little circle indicating the item has a link and/or action 124 125 TOGGLE_XRAY_MODE, // F10 125 TOGGLE_SURROGATE_MODE, // Shift + F10126 CYCLE_SURROGATE_MODE, // Shift + F10 126 127 UNDO, 127 ZOOM 128 ZOOM, 129 ACTIVATE_BUTTON // Enter while over Item with _acceptsKeyboardEnter set to true 128 130 } 129 131 //@formatter:on … … 420 422 public void exec(Gesture gesture) { 421 423 InsertStringGestureData data = (InsertStringGestureData) gesture.getData(); 422 for (char c : data.getString().toCharArray()) { 424 425 Item currentItem = data.getCurrentItem(); 426 char[] charArray = data.getString().toCharArray(); 427 428 if (currentItem != null) { 429 // If we are over a item taht accepts keyboard enter and the only 430 // character being entered is the enter key then we do not insert it. 431 boolean keyboardEnter = data.getCurrentItem().acceptsKeyboardEnter(); 432 if (keyboardEnter && charArray.length == 1 && charArray[0] == (char) 10) { 433 return; 434 } 435 } 436 437 for (char c : charArray) { 423 438 processChar(c, data.isShiftDown()); 424 439 } … … 967 982 }); 968 983 969 setGestureAction(gestureType(StandardGestureType.TOGGLE_SURROGATE_MODE), new GestureAction() { 984 // Set the ACTIVATE BUTTON action 985 setGestureAction(gestureType(StandardGestureType.ACTIVATE_BUTTON), new GestureAction() { 986 @Override 987 public void exec(Gesture gesture) { 988 ItemSpecificGestureData data = (ItemSpecificGestureData) gesture.getData(); 989 if (data.getCurrentItem().acceptsKeyboardEnter()) { 990 getGestureAction(Gesture.GestureType.get("CLICK")).exec(gesture); 991 } 992 } 993 }); 994 995 setGestureAction(gestureType(StandardGestureType.CYCLE_SURROGATE_MODE), new GestureAction() { 970 996 @Override 971 997 public void exec(Gesture gesture) { … … 1745 1771 if (_lastHoldsHighlight) { 1746 1772 _lastHoldsHighlight = false; 1747 for (Item i : DisplayController.getCurrentFrame().get Items()) {1773 for (Item i : DisplayController.getCurrentFrame().getSortedItems()) { 1748 1774 if (i.isHighlighted() && i != on) { 1749 1775 FrameGraphics.changeHighlightMode(i, Item.HighlightMode.None); … … 1824 1850 1825 1851 if (checkEnclosure) { 1826 ItemUtils.EnclosedCheck(toAnchor.getParentOrCurrentFrame().get Items());1852 ItemUtils.EnclosedCheck(toAnchor.getParentOrCurrentFrame().getSortedItems()); 1827 1853 DisplayController.requestRefresh(true); 1828 1854 } … … 1936 1962 } 1937 1963 } else if (!toUndo.contains(i)) { 1938 if (addToUndo) 1939 { 1964 if (addToUndo) { 1940 1965 toUndo.add(i); // Why was is this a copy 1941 1966 } … … 1951 1976 // the current frame as well as the overlay frame 1952 1977 Frame currentFrame = DisplayController.getCurrentFrame(); 1953 currentFrame.addToUndoDelete( itemList);1978 currentFrame.addToUndoDelete(new ItemsList(itemList)); 1954 1979 itemList.clear(); 1955 1980 if (bReparse) { … … 3268 3293 SessionStats.DeletedItems(toUndo); 3269 3294 if (parent != null) { 3270 parent.addToUndoDelete( toUndo);3295 parent.addToUndoDelete(new ItemsList(toUndo)); 3271 3296 parent.removeAllItems(toUndo); // toDelete.getConnected() 3272 3297 } … … 3610 3635 DisplayController.setCursorPosition(toDisconnect.getPosition(), false); 3611 3636 pickup(newPoint); 3612 ItemUtils.EnclosedCheck(toDisconnect.getParentOrCurrentFrame().get Items());3637 ItemUtils.EnclosedCheck(toDisconnect.getParentOrCurrentFrame().getSortedItems()); 3613 3638 } 3614 3639 } … … 3926 3951 mergee.getParent().setChanged(true); 3927 3952 3928 ItemUtils.EnclosedCheck(mergee.getParent().get Items());3953 ItemUtils.EnclosedCheck(mergee.getParent().getSortedItems()); 3929 3954 // Mike: Why does parse frame have to be called?!? 3930 3955 FrameUtils.Parse(mergee.getParent()); … … 4386 4411 int mouseY = position.getY(); 4387 4412 // System.out.println(mouseX + "," + mouseY); 4388 for (Item i : DisplayController.getCurrentFrame().get Items()) {4413 for (Item i : DisplayController.getCurrentFrame().getSortedItems()) { 4389 4414 // System.out.println(i.getName().toString()); 4390 4415 if (i instanceof Text) {
Note:
See TracChangeset
for help on using the changeset viewer.