Exemple #1
0
 /**
  * Allow this window to process key input. The type of key input will be press, release, repeat,
  * etc. The key code will identify which key generated the event. This method will return true if
  * the event was processed by this window or one of its layers, false otherwise.
  *
  * @param type the type of key event (press, release, repeat)
  * @param keyCode the identifier of the key which generated the event
  * @return true if this window or one of its layers processed the event
  */
 public boolean keyInput(int type, int keyCode) {
   CLayer layer;
   synchronized (layers) {
     for (CLayerElement le = layers.getTop(); le != null; le = le.getLower()) {
       layer = le.getLayer();
       if (layer.supportsInput && layer.keyInput(type, keyCode)) {
         return true;
       }
     }
   } // sync
   return false;
 }