Exemplo n.º 1
0
 // "unselect" is needed to handle Ctrl+C copy shortcut collision with ^C signal shortcut
 private boolean handleCopy(boolean unselect) {
   if (mySelection != null) {
     Pair<Point, Point> points = mySelection.pointsForRun(myTermSize.width);
     copySelection(points.first, points.second);
     if (unselect) {
       mySelection = null;
       repaint();
     }
     return true;
   }
   return false;
 }
Exemplo n.º 2
0
 private boolean inSelection(int x, int y) {
   return mySelection != null && mySelection.contains(new Point(x, y));
 }