Search in sources :

Example 1 with SystemWindowSizeEvent

use of com.spinyowl.legui.system.event.SystemWindowSizeEvent in project legui by SpinyOwl.

the class WindowSizeEventHandler method pushEvent.

private void pushEvent(Component component, SystemWindowSizeEvent event, Context context, Frame frame) {
    if (!component.isVisible() || !component.isEnabled()) {
        return;
    }
    EventProcessorProvider.getInstance().pushEvent(new WindowSizeEvent(component, context, frame, event.width, event.height));
    List<Component> childComponents = component.getChildComponents();
    for (Component child : childComponents) {
        pushEvent(child, event, context, frame);
    }
}
Also used : Component(com.spinyowl.legui.component.Component) SystemWindowSizeEvent(com.spinyowl.legui.system.event.SystemWindowSizeEvent) WindowSizeEvent(com.spinyowl.legui.event.WindowSizeEvent)

Aggregations

Component (com.spinyowl.legui.component.Component)1 WindowSizeEvent (com.spinyowl.legui.event.WindowSizeEvent)1 SystemWindowSizeEvent (com.spinyowl.legui.system.event.SystemWindowSizeEvent)1