Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/MagneticConstraint/Actions/DeleteAction.java

    r967 r1102  
    11package org.expeditee.items.MagneticConstraint.Actions;
    22
    3 import org.expeditee.gui.DisplayIO;
     3import org.expeditee.gui.DisplayController;
    44import org.expeditee.items.Item;
    55import org.expeditee.items.Text;
     
    1515                if(item.getParent() == null || !this.isSpIDERCodePage(item.getParent())) return false;
    1616                if(item == null || ((Text) item).isEmpty()) {
    17                         final Text temp = DisplayIO.getCurrentFrame().createNewText(".");
     17                        final Text temp = DisplayController.getCurrentFrame().createNewText(".");
    1818                        callback(temp);
    1919                        if(temp.getMagnetizedItemRight() != -1)
    20                                 DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemRight()), Text.HOME);
     20                                DisplayController.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemRight()), Text.HOME);
    2121                        else if(temp.getMagnetizedItemBottom() != -1)
    22                                 DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemBottom()), Text.HOME);
     22                                DisplayController.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemBottom()), Text.HOME);
    2323                        temp.delete();
    2424                        callback(temp);
    2525                        return true;
    26                 } else if(item.getMagnetizedItemRight() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayIO.getMouseX())) {
     26                } else if(item.getMagnetizedItemRight() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayController.getMouseX())) {
    2727                        new NextItemAction().exec(item);
    2828                        return true;
    29                 } else if(item.getMagnetizedItemBottom() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayIO.getMouseX())) {
     29                } else if(item.getMagnetizedItemBottom() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayController.getMouseX())) {
    3030                        callback(item);
    3131                        final Line currentLine = Line.getLineFromToken(item);
     
    3333                        if(nextLine != null && Paragraph.getParagraphFromLine(currentLine).contains(nextLine)) {
    3434                                currentLine.appendLine(nextLine);
    35                                 DisplayIO.setTextCursor((Text) item, Text.END);
     35                                DisplayController.setTextCursor((Text) item, Text.END);
    3636                                callback(item);
    3737                                return true;
Note: See TracChangeset for help on using the changeset viewer.