Exemple #1
0
 public boolean type(char key, KeyEvent ev) {
   if (qline != null) {
     qline.key(ev);
     return (true);
   } else {
     return (super.type(key, ev));
   }
 }
Exemple #2
0
 public boolean keydown(KeyEvent ev) {
   boolean M = (ev.getModifiersEx() & (KeyEvent.META_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)) != 0;
   if (qline != null) {
     if (M && (ev.getKeyCode() == KeyEvent.VK_UP)) {
       Channel prev = this.sel;
       while (chansel.up()) {
         if (this.sel instanceof EntryChannel) break;
       }
       if (!(this.sel instanceof EntryChannel)) {
         select(prev);
         return (true);
       }
       qline = new QuickLine((EntryChannel) sel);
       return (true);
     } else if (M && (ev.getKeyCode() == KeyEvent.VK_DOWN)) {
       Channel prev = this.sel;
       while (chansel.down()) {
         if (this.sel instanceof EntryChannel) break;
       }
       if (!(this.sel instanceof EntryChannel)) {
         select(prev);
         return (true);
       }
       qline = new QuickLine((EntryChannel) sel);
       return (true);
     }
     qline.key(ev);
     return (true);
   } else {
     if (M && (ev.getKeyCode() == KeyEvent.VK_UP)) {
       chansel.up();
       return (true);
     } else if (M && (ev.getKeyCode() == KeyEvent.VK_DOWN)) {
       chansel.down();
       return (true);
     }
     return (super.keydown(ev));
   }
 }