Exemple #1
0
 /**
  * Invokes special keys.
  *
  * @param e key event
  * @return {@code true} if special key was processed
  */
 private boolean specialKey(final KeyEvent e) {
   if (PREVTAB.is(e)) {
     gui.editor.tab(false);
   } else if (NEXTTAB.is(e)) {
     gui.editor.tab(true);
   } else if (CLOSETAB.is(e)) {
     gui.editor.close(null);
   } else if (search != null && ESCAPE.is(e)) {
     search.deactivate(true);
   } else {
     return false;
   }
   e.consume();
   return true;
 }
Exemple #2
0
 /**
  * Highlights the next/previous hit.
  *
  * @param next next/previous hit
  */
 private void find(final boolean next) {
   final boolean vis = search.isVisible();
   search.activate(searchString(), false);
   jump(vis ? next ? SearchDir.FORWARD : SearchDir.BACKWARD : SearchDir.CURRENT, true);
 }