Class SWindowEvent

All Implemented Interfaces:
Serializable

public class SWindowEvent extends SComponentEvent
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 Details

  • 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 as SComponentEvent.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, or null when unknown. Our wiring passes null uniformly — 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 for WINDOW_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; see getOldState().
    • paramString

      public String paramString()
      Overrides:
      paramString in class SComponentEvent