Class SAncestorEvent

java.lang.Object
java.util.EventObject
java.awt.AWTEvent
com.vaadin.swingbridge.surrogates.awt.event.SAncestorEvent
All Implemented Interfaces:
Serializable

public class SAncestorEvent extends AWTEvent
Surrogate-side port of AncestorEvent. Source type retyped from JComponent to Vaadin Component; ancestor / ancestorParent retyped from Container to Component for the same reason (SD_event_port_stance).

Constants (ANCESTOR_ADDED / ANCESTOR_REMOVED / ANCESTOR_MOVED) preserved verbatim from JDK so id-arithmetic carries across.

See Also:
  • Field Details

  • Constructor Details

    • SAncestorEvent

      public SAncestorEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component ancestor, com.vaadin.flow.component.Component ancestorParent)
      Parameters:
      source - the component whose ancestor relationship changed
      id - one of ANCESTOR_ADDED / ANCESTOR_REMOVED / ANCESTOR_MOVED
      ancestor - the ancestor component that was added / removed / moved (typically the source itself for direct attach/detach events)
      ancestorParent - the ancestor's parent at the moment of the event (null when the source has no parent)
  • Method Details

    • getAncestor

      public com.vaadin.flow.component.Component getAncestor()
      The ancestor whose state changed.
    • getAncestorParent

      public com.vaadin.flow.component.Component getAncestorParent()
      Parent of getAncestor() at the time of the event.
    • getComponent

      public com.vaadin.flow.component.Component getComponent()
      Convenience — same as (Component) getSource().
    • paramString

      public String paramString()
      Overrides:
      paramString in class AWTEvent