예제 #1
0
 private EditorCell findTarget(EditorCell cell) {
   EditorCell toLeft = cell.getLeafToLeft(CellConditions.SELECTABLE);
   if (toLeft != null) {
     return toLeft;
   }
   return cell.getPrevLeaf(CellConditions.SELECTABLE);
 }
예제 #2
0
 private EditorCell findTarget(SelectionManager selectionManager) {
   Selection selection = selectionManager.getSelection();
   if (selection == null) {
     return null;
   }
   List<EditorCell> selectedCells = selection.getSelectedCells();
   EditorCell cell = myHome ? selectedCells.get(0) : selectedCells.get(selectedCells.size() - 1);
   EditorCell leaf =
       myHome
           ? cell.getLeafToLeft(CellConditions.SELECTABLE)
           : cell.getLeafToRight(CellConditions.SELECTABLE);
   if (leaf != null) {
     return leaf;
   }
   return myHome
       ? cell.getPrevLeaf(CellConditions.SELECTABLE)
       : cell.getNextLeaf(CellConditions.SELECTABLE);
 }