src/main/java/com/spinyowl/legui/system/handler/AbstractSystemEventHandler.java
public final void handle(E event, Frame frame, Context context) {
    preHandle(event, frame, context);
    List<Layer> layers = frame.getAllLayers();
    Collections.reverse(layers);
    for (Layer layer : layers) {
      if (layer.isEventReceivable()) {
        if (!layer.isVisible() || !layer.isEnabled()) {
          continue;
        }
        if (handle(event, layer, context, frame)) {
          return;
        }
      }
      if (!layer.isEventPassable()) {
        return;
      }
    }
    postHandle(event, frame, context);
  }
/**
   * Default implementation of event handler {@link SystemEventHandler#handle(SystemEvent, Frame,
   * Context)} method. Used to handle events and check if event should be passed to underlying layer
   * or not.
   *
   * @param event   event to handle.
   * @param frame   target frame for event.
   * @param context context.
   */
Default implementation of event handler {@link SystemEventHandler#handle(SystemEvent, Frame,
Context)} method. Used to handle events and check if event should be passed to underlying layer
or not.

@param event   event to handle.
@param frame   target frame for event.
@param context context.
Default implementation of event handler { @link SystemEventHandler#handle ( SystemEvent Frame Context ) } method . Used to handle events and check if event should be passed to underlying layer or not . @param event event to handle . @param frame target frame for event . @param context context .
public final void handle(E event, Frame frame, Context context) {
    preHandle(event, frame, context);
    List<Layer> layers = frame.getAllLayers();
    Collections.reverse(layers);
    for (Layer layer : layers) {
      if (layer.isEventReceivable()) {
        if (!layer.isVisible() || !layer.isEnabled()) {
          continue;
        }
        if (handle(event, layer, context, frame)) {
          return;
        }
      }
      if (!layer.isEventPassable()) {
        return;
      }
    }
    postHandle(event, frame, context);
  }
public final void handle ( E event , Frame frame , Context context ) { preHandle ( event , frame , context ) ; List < Layer > layers = frame . getAllLayers ( ) ; Collections . reverse ( layers ) ; for ( Layer layer : layers ) { if ( layer . isEventReceivable ( ) ) { if ( ! layer . isVisible ( ) || ! layer . isEnabled ( ) ) { continue ; } if ( handle ( event , layer , context , frame ) ) { return ; } } if ( ! layer . isEventPassable ( ) ) { return ; } } postHandle ( event , frame , context ) ; }
Default implementation of event handler {@link SystemEventHandler#handle(SystemEvent, Frame,
 Context)} method.
Default implementation of event handler { @link SystemEventHandler#handle ( SystemEvent Frame Context ) } method .