Class SWindowEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
com.vaadin.swingbridge.surrogates.awt.event.SComponentEvent
com.vaadin.swingbridge.surrogates.awt.event.SWindowEvent
- All Implemented Interfaces:
Serializable
Surrogate-side port of
WindowEvent. Source and
opposite retyped from Window to Vaadin
Component per SD_event_port_stance — the surrogates that
emit this event (currently SFrame) extend Dialog directly, so
"the other window on the focus transition" is a Vaadin Component, not
an AWT Window.
Constants preserved verbatim from WindowEvent
so id arithmetic carries across unchanged — migrated code that
checks e.getID() == WindowEvent.WINDOW_CLOSING works against
either value (same int).
Ported eagerly alongside SWindow per SD_event_port_stance — every id routes
through SWindow.processWindowEvent / ...FocusEvent /
...StateEvent, and splitting the port (fire OPENED / CLOSING but not
STATE_CHANGED) would break the id-to-method dispatch switch.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class SComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWNFields inherited from class AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASKFields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSWindowEvent(com.vaadin.flow.component.Component source, int id) SWindowEvent(com.vaadin.flow.component.Component source, int id, int oldState, int newState) SWindowEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component opposite) SWindowEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component opposite, int oldState, int newState) -
Method Summary
Modifier and TypeMethodDescriptionintPost-transition state; seegetOldState().intPre-transition window state forWINDOW_STATE_CHANGED; zero (NORMAL) for every other id since we don't model iconify / maximize (no OS window manager concept in a browser tab).com.vaadin.flow.component.ComponentThe focus/activation counterpart on the other end of the transition, ornullwhen unknown.com.vaadin.flow.component.ComponentSame asSComponentEvent.getComponent()but typed to match the JDK shape.Methods inherited from class SComponentEvent
getComponentMethods inherited from class EventObject
getSource
-
Field Details
-
WINDOW_ACTIVATED
public static final int WINDOW_ACTIVATED- See Also:
-
WINDOW_CLOSED
public static final int WINDOW_CLOSED- See Also:
-
WINDOW_CLOSING
public static final int WINDOW_CLOSING- See Also:
-
WINDOW_DEACTIVATED
public static final int WINDOW_DEACTIVATED- See Also:
-
WINDOW_DEICONIFIED
public static final int WINDOW_DEICONIFIED- See Also:
-
WINDOW_FIRST
public static final int WINDOW_FIRST- See Also:
-
WINDOW_GAINED_FOCUS
public static final int WINDOW_GAINED_FOCUS- See Also:
-
WINDOW_ICONIFIED
public static final int WINDOW_ICONIFIED- See Also:
-
WINDOW_LAST
public static final int WINDOW_LAST- See Also:
-
WINDOW_LOST_FOCUS
public static final int WINDOW_LOST_FOCUS- See Also:
-
WINDOW_OPENED
public static final int WINDOW_OPENED- See Also:
-
WINDOW_STATE_CHANGED
public static final int WINDOW_STATE_CHANGED- See Also:
-
-
Constructor Details
-
SWindowEvent
public SWindowEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component opposite, int oldState, int newState) -
SWindowEvent
public SWindowEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component opposite) -
SWindowEvent
public SWindowEvent(com.vaadin.flow.component.Component source, int id, int oldState, int newState) -
SWindowEvent
public SWindowEvent(com.vaadin.flow.component.Component source, int id)
-
-
Method Details
-
getWindow
public com.vaadin.flow.component.Component getWindow()Same asSComponentEvent.getComponent()but typed to match the JDK shape. -
getOppositeWindow
public com.vaadin.flow.component.Component getOppositeWindow()The focus/activation counterpart on the other end of the transition, ornullwhen unknown. Our wiring passesnulluniformly — browser window focus transitions don't surface the opposite server-side — so the field is preserved mainly for migrated code that reads it through the ported listener without branching. -
getOldState
public int getOldState()Pre-transition window state forWINDOW_STATE_CHANGED; zero (NORMAL) for every other id since we don't model iconify / maximize (no OS window manager concept in a browser tab). -
getNewState
public int getNewState()Post-transition state; seegetOldState(). -
paramString
- Overrides:
paramStringin classSComponentEvent
-