Feed an event to Window’s listener. Same as getEventListener().accept(Event)
(Event e)
| 401 | * <p>Feed an event to Window’s listener. Same as getEventListener().accept(Event)</p> |
| 402 | */ |
| 403 | public void accept(Event e) { |
| 404 | if (_layer != null) { |
| 405 | if (e instanceof EventWindowScreenChange) { |
| 406 | _layer.reconfigure(); |
| 407 | } else if (e instanceof EventWindowResize) { |
| 408 | EventWindowResize ee = (EventWindowResize) e; |
| 409 | _layer.resize(ee.getContentWidth(), ee.getContentHeight()); |
| 410 | } else if (e instanceof EventFrame) { |
| 411 | _layer.frame(); |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | if (_eventListener != null) { |
| 416 | try { |
| 417 | _eventListener.accept(e); |
| 418 | } catch (Exception ex) { |
| 419 | Log.log(ex); |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | if (e instanceof EventWindowScreenChange) { |
| 424 | accept(new EventWindowResize(this)); |
| 425 | } else if (e instanceof EventWindowResize && Platform.CURRENT != Platform.X11) { |
| 426 | accept(EventFrame.INSTANCE); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * <p>Close window and release its internal resources.</p> |
no test coverage detected