Changeset 1144 for trunk/src/org/expeditee/gio/gesture
- Timestamp:
- 09/18/18 12:02:44 (6 years ago)
- Location:
- trunk/src/org/expeditee/gio/gesture
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gio/gesture/ExpediteeKBMGestureTranslator.java
r1135 r1144 406 406 // Calculate the new cursor position 407 407 Point cursorPosition = EcosystemManager.getInputManager().getCursorPosition(); 408 if (kbmEvent.getKeyDown() == Key.UP_ARROW) cursorPosition. y -= distance;409 if (kbmEvent.getKeyDown() == Key.DOWN_ARROW) cursorPosition. y += distance;410 if (kbmEvent.getKeyDown() == Key.LEFT_ARROW) cursorPosition. x -= distance;411 if (kbmEvent.getKeyDown() == Key.RIGHT_ARROW) cursorPosition. x += distance;408 if (kbmEvent.getKeyDown() == Key.UP_ARROW) cursorPosition.setY(cursorPosition.getY() - distance); 409 if (kbmEvent.getKeyDown() == Key.DOWN_ARROW) cursorPosition.setY(cursorPosition.getY() + distance); 410 if (kbmEvent.getKeyDown() == Key.LEFT_ARROW) cursorPosition.setX(cursorPosition.getX() - distance); 411 if (kbmEvent.getKeyDown() == Key.RIGHT_ARROW) cursorPosition.setX(cursorPosition.getX() + distance); 412 412 413 413 // Create the MOVE_CURSOR gesture and return it -
trunk/src/org/expeditee/gio/gesture/StandardGestureActions.java
r1136 r1144 607 607 public void exec(Gesture gesture) { 608 608 PanGestureData data = (PanGestureData) gesture.getData(); 609 Misc.pan(DisplayController.getCurrentFrame(), data.getPanDelta(). x, data.getPanDelta().y);609 Misc.pan(DisplayController.getCurrentFrame(), data.getPanDelta().getX(), data.getPanDelta().getY()); 610 610 } 611 611 }); … … 658 658 int width = cropped.getWidth(); 659 659 int height = cropped.getHeight(); 660 if(cropped.getSource().getX() + width < data.getPosition(). x) {661 cropped.getSource().setX(data.getPosition(). x- width);660 if(cropped.getSource().getX() + width < data.getPosition().getX()) { 661 cropped.getSource().setX(data.getPosition().getX() - width); 662 662 } 663 if(cropped.getSource().getY() + height < data.getPosition(). y) {664 cropped.getSource().setY(data.getPosition(). y- height);663 if(cropped.getSource().getY() + height < data.getPosition().getY()) { 664 cropped.getSource().setY(data.getPosition().getY() - height); 665 665 } 666 666 pickup(cropped); … … 1055 1055 // class returns 0 for getX 1056 1056 if (!(i instanceof Line) && !(i instanceof XRayable)) { 1057 _offX = DisplayController.getMouseX() - i.getX() + i.getOffset(). x;1058 _offY = DisplayController.getMouseY() - i.getY() + i.getOffset(). y;1057 _offX = DisplayController.getMouseX() - i.getX() + i.getOffset().getX(); 1058 _offY = DisplayController.getMouseY() - i.getY() + i.getOffset().getY(); 1059 1059 1060 1060 // make the offset item the first item in the list (so … … 1071 1071 } else if (toGrab.size() == 1) { 1072 1072 Item soleItem = toGrab.iterator().next(); 1073 _offX = DisplayController.getMouseX() - soleItem.getX() + soleItem.getOffset(). x;1074 _offY = DisplayController.getMouseY() - soleItem.getY() + soleItem.getOffset(). y;1073 _offX = DisplayController.getMouseX() - soleItem.getX() + soleItem.getOffset().getX(); 1074 _offY = DisplayController.getMouseY() - soleItem.getY() + soleItem.getOffset().getY(); 1075 1075 // Now call move so that if we are on a message in the message box 1076 1076 // It doesn't appear up the top of the screen!! … … 1230 1230 1231 1231 // check if the user hit enter and the cursor is now on another text item 1232 if (oldY < newMouse. y) {1232 if (oldY < newMouse.getY()) { 1233 1233 AxisAlignedBoxBounds rect = text.getBoundingBox(); 1234 1234 … … 1245 1245 } 1246 1246 1247 DisplayController.setCursorPosition(newMouse. x, newMouse.y, false);1247 DisplayController.setCursorPosition(newMouse.getX(), newMouse.getY(), false); 1248 1248 return text; 1249 1249 } … … 1263 1263 Item firstDot = toMove.iterator().next(); 1264 1264 1265 int deltax = (to. x- (cursor ? 0 : _offX)) - firstDot.getX();1266 int deltay = (to. y- (cursor ? 0 : _offY)) - firstDot.getY();1265 int deltax = (to.getX() - (cursor ? 0 : _offX)) - firstDot.getX(); 1266 int deltay = (to.getY() - (cursor ? 0 : _offY)) - firstDot.getY(); 1267 1267 1268 1268 // Cache the position of all items before moving any as constraints … … 1275 1275 for (Item move : toMove) { 1276 1276 Point pos = preMovePositions.get(move); 1277 move.setPosition(pos. x + deltax, pos.y+ deltay);1277 move.setPosition(pos.getX() + deltax, pos.getY() + deltay); 1278 1278 1279 1279 if (!cursor && move instanceof Text) { … … 1365 1365 public static void resetOffset() { 1366 1366 if (FreeItems.hasItemsAttachedToCursor()) { 1367 _offX = DisplayController.getMouseX() - FreeItems.getInstance().get(0).getX() + FreeItems.getInstance().get(0).getOffset(). x;1368 _offY = DisplayController.getMouseY() - FreeItems.getInstance().get(0).getY() + FreeItems.getInstance().get(0).getOffset(). y;1367 _offX = DisplayController.getMouseX() - FreeItems.getInstance().get(0).getX() + FreeItems.getInstance().get(0).getOffset().getX(); 1368 _offY = DisplayController.getMouseY() - FreeItems.getInstance().get(0).getY() + FreeItems.getInstance().get(0).getOffset().getY(); 1369 1369 } 1370 1370 } … … 2016 2016 if (zoom_active) { 2017 2017 2018 zoomFrame(DisplayController.getCurrentFrame(), scaleFactor, centreOfZoom. x, centreOfZoom.y);2018 zoomFrame(DisplayController.getCurrentFrame(), scaleFactor, centreOfZoom.getX(), centreOfZoom.getY()); 2019 2019 DisplayController.getCurrentFrame().refreshSize(); 2020 2020 Refresh(); … … 2233 2233 Point oldMousePosition = DisplayController.getMousePosition(); 2234 2234 2235 if (oldMousePosition. x == x && oldMousePosition.y== y) return;2235 if (oldMousePosition.getX() == x && oldMousePosition.getY() == y) return; 2236 2236 2237 2237 DisplayController.setCursorPosition(x, y); … … 2986 2986 2987 2987 // update the offset since the text has changed 2988 _offX = DisplayController.getMouseX() - anchored.getX() + anchored.getOffset(). x;2989 _offY = DisplayController.getMouseY() - anchored.getY() + anchored.getOffset(). y;2988 _offX = DisplayController.getMouseX() - anchored.getX() + anchored.getOffset().getX(); 2989 _offY = DisplayController.getMouseY() - anchored.getY() + anchored.getOffset().getY(); 2990 2990 } else { 2991 2991 // if shift is pressed delete the entire shape attached to the dot … … 4230 4230 if (clicked == null) { 4231 4231 // Check if the user is nearby another item... 4232 int mouseX = position. x;4233 int mouseY = position. y;4232 int mouseX = position.getX(); 4233 int mouseY = position.getY(); 4234 4234 // System.out.println(mouseX + "," + mouseY); 4235 4235 for (Item i : DisplayController.getCurrentFrame().getItems()) { … … 4303 4303 4304 4304 if (clicked instanceof Picture) { 4305 int mouseX = position. x;4306 int mouseY = position. y;4305 int mouseX = position.getX(); 4306 int mouseY = position.getY(); 4307 4307 Picture clickedOnPicture = (Picture)clicked; 4308 4308 Frame current_frame = DisplayController.getCurrentFrame();
Note:
See TracChangeset
for help on using the changeset viewer.