Ignore:
Timestamp:
09/15/15 12:32:33 (9 years ago)
Author:
bln4
Message:
 
Location:
trunk/src/org/expeditee/items/MagneticConstraint
Files:
8 edited

Legend:

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

    r934 r963  
    11package org.expeditee.items.MagneticConstraint.Actions;
    22
     3import java.awt.Point;
     4
     5import org.expeditee.gui.FrameUtils;
    36import org.expeditee.items.Item;
    47import org.expeditee.items.MagneticConstraint.MagneticConstraintActionWithArguments;
    5 import org.expeditee.items.MagneticConstraint.MagneticConstraints;
    68import org.expeditee.items.MagneticConstraint.Utilities.Line;
    79
     
    1618        @Override
    1719        public boolean exec(Item item, Float... args) {
    18                 if(item.getParent() == null || item.getText().startsWith("@")) {
     20                if(item == null || item.getParent() == null || item.getText().startsWith("@") || !isSpIDERCodePage(item.getParent())) {
    1921                        return false;
    2022                }
    21                 if(item.getMagnetizedItemRight() == -1) {
    22                         MagneticConstraints.Log(this.getClass(), new Item[]{item},
    23                                         Line.getLineContainingToken(item).toArray(new Item[]{}),
    24                                         "No right neighbor to attract.");
     23                if(FrameUtils.getCurrentItem() == null) return false;
     24                final Point selectedItemPosition = FrameUtils.getCurrentItem().getPosition();
     25                if(!selectedItemPosition.equals(item.getPosition())) return false;
     26               
     27                if(item.getMagnetizedItemRight() == -1) return false;
     28                else if(item.getParent().getItemWithID(item.getMagnetizedItemRight()) == null) {
     29                        item.setMagnetizedItemRight(null);
    2530                        return false;
    26                 } else if (item.getParent().getItemWithID(item.getMagnetizedItemRight()) == null) {
    27                         item.setMagnetizedItemRight(null);
    28                         MagneticConstraints.Log(this.getClass(), new Item[]{item},
    29                                         Line.getLineContainingToken(item).toArray(new Item[]{}),
    30                                         "Right neighbor has id: " + item.getMagnetizedItemRight() +
    31                                         " according to datastructure but no item on frame has that id.");
    32                         return false;
    33                 }
    34                 else {
     31                } else {
    3532                        final Item toMyRight = item.getParent().getItemWithID(item.getMagnetizedItemRight());
    36                         float newX = toMyRight.getX() - args[0];
    37                         if(newX < toMyRight.getX()) {
    38                                 System.err.println();
    39                         }
    40                         toMyRight.setX(newX);
    41                         MagneticConstraints.Log(this.getClass(), new Item[]{item, toMyRight},
    42                                         Line.getLineContainingToken(item).toArray(new Item[]{}),
    43                                         "Attracting second primary to first.  Delta: " + args[0] + ". NewX: " + newX + ". Recursing.");
    44                         new AttractTextAction().exec(toMyRight, args);
     33                        final Line toAttract = Line.getLineFromToken(toMyRight);
     34                        toAttract.deltaX(-args[0].intValue());
    4535                        return true;
    4636                }
  • trunk/src/org/expeditee/items/MagneticConstraint/Actions/BackspaceAction.java

    r934 r963  
    11package org.expeditee.items.MagneticConstraint.Actions;
    22
    3 import java.awt.Point;
    4 import java.awt.Rectangle;
    5 
    63import org.expeditee.gui.DisplayIO;
    7 import org.expeditee.gui.FrameIO;
    84import org.expeditee.items.Item;
    95import org.expeditee.items.Text;
    106import org.expeditee.items.MagneticConstraint.MagneticConstraintAction;
    11 import org.expeditee.items.MagneticConstraint.MagneticConstraints;
    12 import org.expeditee.items.MagneticConstraint.Utilities.BoxLogic;
    137import org.expeditee.items.MagneticConstraint.Utilities.Line;
    148import org.expeditee.items.MagneticConstraint.Utilities.Paragraph;
     
    1711public class BackspaceAction extends MagneticConstraintAction {
    1812
    19 //      if(newX < this._x) {
    20 //              final java.util.Map<Thread, StackTraceElement[]> allStackTraces = Thread.getAllStackTraces();
    21 //              for(final Thread thr : allStackTraces.keySet()) {
    22 //                      System.err.println(thr.getName());
    23 //                      final StackTraceElement[] stackTraceElements = allStackTraces.get(thr);
    24 //                      for(final StackTraceElement ln : stackTraceElements) System.err.println(ln);
    25 //                      System.err.println();
    26 //              }       
    27 //      }
    2813        @Override
    2914        public boolean exec(final Item item) {
    30                 if(item == null) return false;
    31                 if(item.getMagnetizedItemTop() != -1 && TextLogic.XIsBeforeCharacters((Text) item, DisplayIO.getMouseX())) {
    32                         MagneticConstraints.Log(this.getClass(), new Item[]{item},
    33                                         Line.getLineContainingToken(item).toArray(new Item[]{}),
    34                                         "Top Neighbor detected (id:" + item.getMagnetizedItemTop() + "). Merging this line with line above.");
    35                         return mergeLines(item);
    36                 } else if(TextLogic.XIsBeforeCharacters((Text) item, DisplayIO.getMouseX())) {
    37                         if(item.getMagnetizedItemLeft() != -1) {
    38                                 callback(null);
    39                                 final Item toLeft = item.getParent().getItemWithID(item.getMagnetizedItemLeft());
    40                                 final int initialDistance = item.getX() + item.getBoundsWidth() - toLeft.getX();
    41                                 toLeft.setText(toLeft.getText() + item.getText());
    42                                 item.delete();
    43                                 final int alteredDistance = toLeft.getBoundsWidth();
    44                                 final float delta = (initialDistance - alteredDistance) * 0.8f;
     15                if(item == null || ((Text) item).isEmpty()) {
     16                        final Text temp = DisplayIO.getCurrentFrame().createNewText(".");
     17                        callback(temp);
     18                        if(temp.getMagnetizedItemLeft() != -1)
     19                                DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemLeft()), Text.END);
     20                        else if(temp.getMagnetizedItemTop() != -1)
     21                                DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemTop()), Text.END);
     22                        temp.delete();
     23                        callback(temp);
     24                        return true;
     25                } else if(item.getMagnetizedItemLeft() != -1 && TextLogic.XIsBeforeCharacters((Text) item, DisplayIO.getMouseX())) {
     26                        new LastItemAction().exec(item);
     27                        return true;
     28                } else if(item.getMagnetizedItemTop() != -1 && TextLogic.XIsBeforeCharacters((Text) item, DisplayIO.getMouseX())) {
     29                        callback(item);
     30                        final Line currentLine = Line.getLineFromToken(item);
     31                        final Line lastLine = currentLine.last();
     32                        if(lastLine != null && Paragraph.getParagraphFromLine(lastLine).contains(currentLine)) {
     33                                lastLine.appendLine(currentLine);
     34                                DisplayIO.setTextCursor((Text) item, Text.HOME);
    4535                                callback(item);
    46                                 new AttractTextAction().exec(toLeft, delta);
    47                                 FrameIO.ForceSaveFrame(toLeft.getParent());
    48                                 FrameIO.Reload();
    49                                 callback(null);
    50                                 MagneticConstraints.Log(this.getClass(), new Item[]{item, toLeft},
    51                                                 Line.getLineContainingToken(item).toArray(new Item[]{}),
    52                                                 "Left Neighbor detected (id:" + item.getMagnetizedItemLeft() +
    53                                                 "). Merging second primary into first.  Calling AttractTextAction.");
    5436                                return true;
    55                         } else return false;
    56                 } else return false;
    57         }
    58 
    59         private boolean mergeLines(final Item item) {
    60                 callback(null);
    61                 //1. Get current and last line
    62                 final Line currentLine = Line.getLineFromToken(item);
    63                 final Line lastLine = currentLine.last();
    64                 //2. Is there a last line?  If not we don't do anything
    65                 if(lastLine == null) return false;
    66                 //3. Is the last line in the same paragraph?
    67                 final Paragraph currentLineParagraph = Paragraph.getParagraphFromLine(currentLine);
    68                 final Paragraph lastLineParagraph = Paragraph.getParagraphFromLine(lastLine);
    69                 if(!lastLineParagraph.containsAll(currentLineParagraph)) {
    70                         //3a. No.  We don't do anything.
    71                         return false;
     37                        }
    7238                }
    73                 //NB: at this point we know we have a last line that is in the same paragraph.  So we have to move tokens about.
    74                 //4. Move the tokens.
    75                 for(final Item token: currentLine) if(!moveToLineAbove(token)) break;
    76                 //5. Move the cursor
    77                 DisplayIO.MoveCursorToEndOfItem(lastLine.getLast());
    78                
    79                 //6. Move lines below up
    80                 final Line nextLine = currentLine.next();
    81                 if(nextLine != null && currentLineParagraph.contains(nextLine))
    82                         Paragraph.getParagraphFromLine(nextLine).deltaY(-Line.getLineHeight(currentLine));
    83                 //7. Refresh the screen and use callback to update the magnets.
    84                 FrameIO.ForceSaveFrame(item.getParent());
    85                 FrameIO.Reload();
    86                 callback(item);
    87                 callback(null);
    88                 return true;
    89         }
    90        
    91         private boolean moveToLineAbove(final Item token) {
    92                 final Line currentLine = Line.getLineContainingToken(token);
    93                 final Line lineAbove = currentLine.last();
    94                 final Rectangle lastLineBoundingBox = lineAbove.getBoundingBox();
    95                 final Point locationToMoveTo = new Point((int) (lastLineBoundingBox.getX() + lastLineBoundingBox.getWidth() + 10), (int) lastLineBoundingBox.getMinY());
    96                 token.setPosition(locationToMoveTo);
    97                 currentLine.removeFirst();
    98                 currentLine.deltaX(-token.getBoundsWidth());
    99                 callback(token);
    100                 if(BoxLogic.boxCollision(token)) {
    101                         BoxLogic.resolveCollision(token, this.callbackAction);
    102                         callback(token);
    103                         return false;
    104                 }
    105                 return true;
     39                return false;
    10640        }
    10741
  • trunk/src/org/expeditee/items/MagneticConstraint/Actions/DeleteAction.java

    r934 r963  
    11package org.expeditee.items.MagneticConstraint.Actions;
    2 
    3 import java.awt.event.KeyEvent;
    42
    53import org.expeditee.gui.DisplayIO;
     
    75import org.expeditee.items.Text;
    86import org.expeditee.items.MagneticConstraint.MagneticConstraintAction;
    9 import org.expeditee.items.MagneticConstraint.MagneticConstraints;
     7import org.expeditee.items.MagneticConstraint.Utilities.Line;
     8import org.expeditee.items.MagneticConstraint.Utilities.Paragraph;
    109import org.expeditee.items.MagneticConstraint.Utilities.TextLogic;
    1110
     
    1413        @Override
    1514        public boolean exec(final Item item) {
    16                 if(TextLogic.XIsAfterCharacters((Text) item, DisplayIO.getMouseX())) {
    17                         if(item.getMagnetizedItemRight() != -1) {
    18                                 final Text toMyRight = (Text) item.getParent().getItemWithID(item.getMagnetizedItemRight());
    19                                 final int deltaX = TextLogic.DistanceThroughTextWithXCharacters(toMyRight, 1);
    20                                 DisplayIO.setCursorPosition((float) toMyRight.getPixelBoundsUnion().getX() + deltaX, DisplayIO.getFloatMouseY());
    21                                 MagneticConstraints.getInstance().keyHit(KeyEvent.VK_BACK_SPACE, toMyRight);
    22                                 DisplayIO.MoveCursorToEndOfItem(item);
     15                if(item == null || ((Text) item).isEmpty()) {
     16                        final Text temp = DisplayIO.getCurrentFrame().createNewText(".");
     17                        callback(temp);
     18                        if(temp.getMagnetizedItemRight() != -1)
     19                                DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemRight()), Text.HOME);
     20                        else if(temp.getMagnetizedItemBottom() != -1)
     21                                DisplayIO.setTextCursor((Text) temp.getParent().getItemWithID(temp.getMagnetizedItemBottom()), Text.HOME);
     22                        temp.delete();
     23                        callback(temp);
     24                        return true;
     25                } else if(item.getMagnetizedItemRight() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayIO.getMouseX())) {
     26                        new NextItemAction().exec(item);
     27                        return true;
     28                } else if(item.getMagnetizedItemBottom() != -1 && TextLogic.XIsAfterCharacters((Text) item, DisplayIO.getMouseX())) {
     29                        callback(item);
     30                        final Line currentLine = Line.getLineFromToken(item);
     31                        final Line nextLine = currentLine.next();
     32                        if(nextLine != null && Paragraph.getParagraphFromLine(currentLine).contains(nextLine)) {
     33                                currentLine.appendLine(nextLine);
     34                                DisplayIO.setTextCursor((Text) item, Text.END);
     35                                callback(item);
    2336                                return true;
    24                         } else if (item.getMagnetizedItemBottom() != -1) {
    25                                 final Text belowMe = (Text) item.getParent().getItemWithID(item.getMagnetizedItemBottom());
    26                                 DisplayIO.setCursorPosition(belowMe.getPosition());
    27                                 MagneticConstraints.getInstance().keyHit(KeyEvent.VK_BACK_SPACE, belowMe);
    28                                 return true;
    29                         } else return false;
    30                 } else return false;
     37                        }
     38                }
     39                return false;
    3140        }
    3241
  • trunk/src/org/expeditee/items/MagneticConstraint/Actions/RepelTextAction.java

    r962 r963  
    3131               
    3232                if(item.getMagnetizedItemRight() == -1) {
    33                        
     33                        if(BoxLogic.boxCollision(item)) {
     34                                RepelTextDownAction.MergeSameLineParagraphCollisions = true;
     35                                final RepelTextDownAction textDownAction = new RepelTextDownAction();
     36                                textDownAction.setCallbackAction(this.callbackAction);
     37                                textDownAction.exec(item);
     38                                RepelTextDownAction.MergeSameLineParagraphCollisions = false;
     39                        }
    3440                } else if(item.getParent().getItemWithID(item.getMagnetizedItemRight()) == null) {
    3541                        item.setMagnetizedItemRight(null);
     
    4147                        for(final Item token : tokensToMove) {
    4248                                if(BoxLogic.boxCollision(token)) {
     49                                        RepelTextDownAction.MergeSameLineParagraphCollisions = true;
    4350                                        final RepelTextDownAction textDownAction = new RepelTextDownAction();
    4451                                        textDownAction.setCallbackAction(this.callbackAction);
    4552                                        textDownAction.exec(token);
     53                                        RepelTextDownAction.MergeSameLineParagraphCollisions = false;
    4654                                        break;
    4755                                }
  • trunk/src/org/expeditee/items/MagneticConstraint/Actions/RepelTextDownAction.java

    r962 r963  
    1515public class RepelTextDownAction extends MagneticConstraintAction {
    1616       
    17 //      private void f(final Item item) {
    18 //              final List<Item> items = item.getParent().getItems();
    19 //              for (final Item item2 : items) {
    20 //                      if(item2.getText().compareTo("main") == 0) System.err.println("#Found main");
    21 //              }
    22 //      }
     17        public static boolean MergeSameLineParagraphCollisions = false;
    2318       
    2419        @Override
    2520        public boolean exec(final Item item) {
    26                 if(item == null || item.getParent() == null) return false;
    27                 callback(item);
     21                if(item == null || item.getParent() == null) return false;             
     22                callback(item); 
    2823                //Calculate content that needs to be moved to next line.
    2924                        //1. Get remainder of line
     
    3732                }
    3833                       
    39                 //Move content below this line down
    40                         //1. Get current line & current paragraph.
    4134                final Line currentLine = Line.getLineContainingToken(item);
    4235                final Paragraph currentParagraph = Paragraph.getParagraphFromLine(currentLine);
    43                         //2. Split current paragraph
    44                 final Point newLineAt = currentParagraph.split(currentLine);
     36                final Line nextLine = currentLine.next();
     37               
     38                final Point newLineAt;
    4539                //Move content contained in 'remainderOfLine'
    46                         //1. Is remainderOfLine not Empty?
    47                 if(!remainderOfLine.isEmpty()) {
    48                                 //2a. Yes. Move the content
     40
     41               
     42                if(!remainderOfLine.isEmpty() && currentParagraph.contains(nextLine) && MergeSameLineParagraphCollisions) {
     43                        nextLine.prependLine(remainderOfLine);
     44                        DisplayIO.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME);
     45                        callback(remainderOfLine.getFirst());
     46                        FrameIO.SaveFrame(remainderOfLine.getLast().getParent());
     47                } else if(!remainderOfLine.isEmpty()) {
     48                        newLineAt = currentParagraph.split(currentLine);
    4949                        final Point first = remainderOfLine.getBoundingBox().getLocation();
    5050                        for(final Item token : remainderOfLine) {
     
    5252                                token.setPosition((float) newX, (float) newLineAt.getY());
    5353                        }
    54                                 //2b. Move the cursor; refresh the screen and use callback to update the magnets
    5554                        DisplayIO.setTextCursor((Text) remainderOfLine.getFirst(), Text.HOME);
    56                         callback(null);
     55                        callback(remainderOfLine.getFirst());
    5756                        FrameIO.SaveFrame(remainderOfLine.getLast().getParent());
    58                 } else {
    59                                 //3a No. Move the cursor; refresh the screen and use callback to update the magnets
     57                }else {
     58                                //3a No. Move the cursor
     59                        newLineAt = currentParagraph.split(currentLine);
    6060                        DisplayIO.setCursorPosition(newLineAt);
    6161                }
    62 
     62               
    6363                return true;
    6464        }
  • trunk/src/org/expeditee/items/MagneticConstraint/Utilities/BoxLogic.java

    r960 r963  
    11package org.expeditee.items.MagneticConstraint.Utilities;
    22
    3 import java.awt.Point;
    43import java.awt.Rectangle;
    54import java.util.Collection;
     
    76import java.util.List;
    87
    9 import org.expeditee.gui.DisplayIO;
    108import org.expeditee.gui.Frame;
    11 import org.expeditee.gui.FrameIO;
    12 import org.expeditee.gui.FrameUtils;
    139import org.expeditee.items.Dot;
    1410import org.expeditee.items.Item;
    15 import org.expeditee.items.MagneticConstraint.MagneticConstraintAction;
    1611
    1712public class BoxLogic {
     
    6661//      }
    6762
    68         public static void resolveCollision(final Item item, final MagneticConstraintAction remagnet) {
    69                 boolean updateCursor = FrameUtils.getCurrentItem() == item;
    70                 final Line currentLine = Line.getLineContainingToken(item);
    71                 final Paragraph currentParagraph = Paragraph.getParagraphFromLine(currentLine);
    72                 final Point newLineAt = currentParagraph.split(currentLine);
    73                 final Line lineFromToken = Line.getLineFromToken(item);
    74                 lineFromToken.deltaX((int) newLineAt.getX() - lineFromToken.getFirst().getX());
    75                 lineFromToken.deltaY((int) newLineAt.getY() - lineFromToken.getFirst().getY());
    76                 remagnet.callback(null);
    77                 final Line nextLine = lineFromToken.next();
    78                 if(nextLine != null && nextLine.getBoundingBox().getX() >= lineFromToken.getBoundingBox().getX()) {
    79                         final Paragraph paragraphFromNewLine = Paragraph.getParagraphFromLine(lineFromToken);
    80                         final Paragraph paragraphFromNextLine = Paragraph.getParagraphFromLine(nextLine);
    81                         if(paragraphFromNewLine.containsAll(paragraphFromNextLine)) {
    82                                 final Rectangle newLineBoundingBox = lineFromToken.getBoundingBox();
    83                                 nextLine.setX((int) newLineBoundingBox.getMaxX());
    84                                 nextLine.setY((int) newLineBoundingBox.getY());
    85                         }
    86                 }
    87                 if(updateCursor) DisplayIO.MoveCursorToEndOfItem(item);
    88                 FrameIO.ForceSaveFrame(item.getParent());
    89         }
     63//      public static void resolveCollision(final Item item, final MagneticConstraintAction remagnet) {
     64//              boolean updateCursor = FrameUtils.getCurrentItem() == item;
     65//              final Line currentLine = Line.getLineContainingToken(item);
     66//              final Paragraph currentParagraph = Paragraph.getParagraphFromLine(currentLine);
     67//              final Point newLineAt = currentParagraph.split(currentLine);
     68//              final Line lineFromToken = Line.getLineFromToken(item);
     69//              lineFromToken.deltaX((int) newLineAt.getX() - lineFromToken.getFirst().getX());
     70//              lineFromToken.deltaY((int) newLineAt.getY() - lineFromToken.getFirst().getY());
     71//              remagnet.callback(null);
     72//              final Line nextLine = lineFromToken.next();
     73//              if(nextLine != null && nextLine.getBoundingBox().getX() >= lineFromToken.getBoundingBox().getX()) {
     74//                      final Paragraph paragraphFromNewLine = Paragraph.getParagraphFromLine(lineFromToken);
     75//                      final Paragraph paragraphFromNextLine = Paragraph.getParagraphFromLine(nextLine);
     76//                      if(paragraphFromNewLine.containsAll(paragraphFromNextLine)) {
     77//                              final Rectangle newLineBoundingBox = lineFromToken.getBoundingBox();
     78//                              nextLine.setX((int) newLineBoundingBox.getMaxX());
     79//                              nextLine.setY((int) newLineBoundingBox.getY());
     80//                      }
     81//              }
     82//              if(updateCursor) DisplayIO.MoveCursorToEndOfItem(item);
     83//              FrameIO.ForceSaveFrame(item.getParent());
     84//      }
    9085}
  • trunk/src/org/expeditee/items/MagneticConstraint/Utilities/Line.java

    r962 r963  
    22
    33import java.awt.Rectangle;
    4 import java.util.*;
     4import java.util.LinkedList;
    55
    66import org.expeditee.items.Item;
     
    88@SuppressWarnings("serial")
    99public class Line extends LinkedList<Item> {
    10        
     10               
    1111        private Line() {
    1212                super();
     
    1717        }
    1818       
     19        public Line prependLine(final Line line) {
     20                final int x = this.getBoundingBox().x;
     21                final int width = line.getBoundingBox().width;
     22                this.deltaX(width);
     23                line.setX(x);
     24                line.setY(this.getFirst().getY());
     25                return Line.getLineFromToken(line.getFirst());
     26        }
     27       
     28        public Line appendLine(final Line line) {
     29                final int x = this.getBoundingBox().x;
     30                final int width = this.getBoundingBox().width;
     31                line.setX(x + width);
     32                line.setY(this.getFirst().getY());
     33                return Line.getLineFromToken(this.getFirst());
     34        }
     35       
    1936        public static Line getLineFromToken(final Item token) {
    2037                if(token == null) return new Line();
    21                 else return getLineFromToken(token, new Line());
     38                else {
     39                        return getLineFromToken(token, new Line());
     40                }
    2241        }
    2342       
    2443        public static Line getLineContainingToken(final Item token) {
    2544                if(token == null) return new Line();
     45                final Line ret = new Line();
    2646                Item current = token;
    27                 while(current.getMagnetizedItemLeft() != -1)
     47                while(current.getMagnetizedItemLeft() != -1) {
    2848                        current = current.getParent().getItemWithID(current.getMagnetizedItemLeft());
    29                 return getLineFromToken(current, new Line());
     49                        ret.addFirst(current);
     50                }
     51                final Line following = getLineFromToken(token, new Line());
     52                ret.addAll(following);
     53                return ret;
     54//              return getLineFromToken(current, new Line());
    3055        }
    3156       
  • trunk/src/org/expeditee/items/MagneticConstraint/Utilities/TextLogic.java

    r962 r963  
    22
    33import org.expeditee.gui.Browser;
     4import org.expeditee.gui.DisplayIO;
    45import org.expeditee.items.Text;
    56
     
    3940        }
    4041       
    41         public static int DistanceThroughTextWithXCharacters(final Text text, final int x) {
    42                 return Browser._theBrowser.getFontMetrics(Browser._theBrowser.getFont()).stringWidth(text.getText().substring(0, Math.min(text.getText().length() - 1, x - 1)));
     42        public static int GetInsertionIndexSelected(final Text text) {
     43                return text.getCharPosition(0, DisplayIO.getMouseX()).getInsertionIndex();
    4344        }
    4445}
Note: See TracChangeset for help on using the changeset viewer.