Changeset 1102 for trunk/src/org/expeditee/items/MagneticConstraint/Actions/RepelTextDownAction.java
- Timestamp:
- 05/10/18 16:04:51 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/MagneticConstraint/Actions/RepelTextDownAction.java
r967 r1102 1 1 package org.expeditee.items.MagneticConstraint.Actions; 2 2 3 import java.awt.Point; 4 5 import org.expeditee.gui.DisplayIO; 3 import org.expeditee.core.Point; 4 import org.expeditee.gui.DisplayController; 6 5 import org.expeditee.gui.FrameIO; 7 6 import org.expeditee.gui.FrameUtils; … … 28 27 (FrameUtils.getCurrentItem().getPosition().equals(item.getPosition()) 29 28 && remainderOfLine.size() > 0 30 && TextLogic.XIsTowardsRight(Display IO.getMouseX(), (Text) remainderOfLine.getFirst()))) {29 && TextLogic.XIsTowardsRight(DisplayController.getMouseX(), (Text) remainderOfLine.getFirst()))) { 31 30 remainderOfLine.removeFirst(); 32 31 } … … 42 41 if(!remainderOfLine.isEmpty() && currentParagraph.contains(nextLine) && MergeSameLineParagraphCollisions) { 43 42 nextLine.prependLine(remainderOfLine); 44 Display IO.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME);43 DisplayController.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME); 45 44 callback(remainderOfLine.getFirst()); 46 45 FrameIO.SaveFrame(remainderOfLine.getLast().getParent()); 47 46 } else if(!remainderOfLine.isEmpty()) { 48 47 newLineAt = currentParagraph.split(currentLine); 49 final Point first = remainderOfLine.getBoundingBox().get Location();48 final Point first = remainderOfLine.getBoundingBox().getTopLeft(); 50 49 for(final Item token : remainderOfLine) { 51 50 double newX = token.getX() - first.getX() + newLineAt.getX(); 52 51 token.setPosition((float) newX, (float) newLineAt.getY()); 53 52 } 54 Display IO.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME);53 DisplayController.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME); 55 54 callback(remainderOfLine.getFirst()); 56 55 FrameIO.SaveFrame(remainderOfLine.getLast().getParent()); … … 58 57 //3a No. Move the cursor 59 58 newLineAt = currentParagraph.split(currentLine); 60 Display IO.setCursorPosition(newLineAt);59 DisplayController.setCursorPosition(newLineAt); 61 60 } 62 61
Note:
See TracChangeset
for help on using the changeset viewer.