Ignore:
Timestamp:
09/18/18 11:57:32 (6 years ago)
Author:
bln4
Message:

Used Eclipse refactoring to encapsulate Point.X and Point.Y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/items/EmulatedTextItem.java

    r1125 r1142  
    9797                Point p = EcosystemManager.getInputManager().getCursorPosition();
    9898               
    99                 return isOnEmulatedText(p.x, p.y);
     99                return isOnEmulatedText(p.getX(), p.getY());
    100100        }
    101101       
     
    134134
    135135                // If so and the event really comes from its parent ...
    136                 if (isOnEmulatedText(p.x, p.y)) {
     136                if (isOnEmulatedText(p.getX(), p.getY())) {
    137137                       
    138138                        int yOffset = -6;
     
    154154                        {
    155155                                // Insert the text according to the current mouse position
    156                                 Point newMouse = emulatedSource.insertChar(e.getKeyChar(), p.x, p.y);
     156                                Point newMouse = emulatedSource.insertChar(e.getKeyChar(), p.getX(), p.getY());
    157157                               
    158158                                List<String> lines = emulatedSource.getTextList();
     
    166166                                // Move "cursored mouse"
    167167                                if (newMouse != null) {
    168                                         EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.x, (int) newMouse.y + yOffset));
     168                                        EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.getX(), (int) newMouse.getY() + yOffset));
    169169                                }
    170170                        }
     
    193193
    194194                // If so and the event really comes from its parent ...
    195                 if (isOnEmulatedText(p.x, p.y)) {
     195                if (isOnEmulatedText(p.getX(), p.getY())) {
    196196                       
    197197                        int yOffset = -6;
     
    207207                               
    208208                                if (newMouse != null) {
    209                                         EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.x, (int) newMouse.y + yOffset));
     209                                        EcosystemManager.getInputManager().setCursorPosition(new Point((int) newMouse.getX(), (int) newMouse.getY() + yOffset));
    210210                                }
    211211
     
    241241
    242242                // If so and the event really comes from its parent ...
    243                 if (isOnEmulatedText(p.x, p.y)) {
     243                if (isOnEmulatedText(p.getX(), p.getY())) {
    244244                       
    245245                        String toMoveIntoFreespace = null;
     
    267267                                if (target != null) {
    268268                                        Text selectionCopy = new Text(target.getNextItemID(), toMoveIntoFreespace);
    269                                         selectionCopy.setPosition(p.x, p.y);
     269                                        selectionCopy.setPosition(p.getX(), p.getY());
    270270                                        selectionCopy.setSize(emulatedSource.getSize());
    271271                                        StandardGestureActions.pickup(selectionCopy);
     
    290290
    291291                // If so and the event really comes from its parent ...
    292                 if (isOnEmulatedText(p.x, p.y)) {
     292                if (isOnEmulatedText(p.getX(), p.getY())) {
    293293                       
    294294                        emulatedSource.clearSelection();
    295                         emulatedSource.setSelectionStart(p.x, p.y, e.getButton());
     295                        emulatedSource.setSelectionStart(p.getX(), p.getY(), e.getButton());
    296296
    297297                        repaint();
     
    313313
    314314                // If so and the event really comes from its parent ...
    315                 if (isOnEmulatedText(p.x, p.y)) {
     315                if (isOnEmulatedText(p.getX(), p.getY())) {
    316316
    317317                        EcosystemManager.getGraphicsManager().setCursor(new Cursor(Cursor.CursorType.TEXT));
    318318                       
    319                         emulatedSource.setSelectionEnd(p.x, p.y);
     319                        emulatedSource.setSelectionEnd(p.getX(), p.getY());
    320320                        repaint();
    321321                       
Note: See TracChangeset for help on using the changeset viewer.