Class SHierarchyEvent

All Implemented Interfaces:
Serializable

public class SHierarchyEvent extends SComponentEvent
Surrogate-side port of HierarchyEvent. Source, changed, and changedParent all retyped from Component / Container to Vaadin Component — the surrogate world has no separate Container type (SD_event_port_stance rationale).

The change-flag constants are AWT's, by delegation rather than by value, so bitmask arithmetic on getChangeFlags() results carries across unchanged; the block is emitted by DelegatedConstantsTest from AWT's public runtime API. Delegation also settles what used to need a comment here: HIERARCHY_LAST tracks whatever AWT says it is, rather than a literal that would leave ANCESTOR_RESIZED outside every id <= HIERARCHY_LAST range check (D_missing_constants).

See Also:
  • Field Details

  • Constructor Details

    • SHierarchyEvent

      public SHierarchyEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component changed, com.vaadin.flow.component.Component changedParent)
    • SHierarchyEvent

      public SHierarchyEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component changed, com.vaadin.flow.component.Component changedParent, long changeFlags)
  • Method Details

    • getChanged

      public com.vaadin.flow.component.Component getChanged()
      The component whose hierarchy state changed (may equal the source).
    • getChangedParent

      public com.vaadin.flow.component.Component getChangedParent()
      The parent of changed at the moment the event fires. For HIERARCHY_CHANGED on a newly-attached component this is the new parent; on a detach this is the old parent. JDK's contract is identical — see HierarchyEvent.getChangedParent().
    • getChangeFlags

      public long getChangeFlags()
      Bit-or of the PARENT_CHANGED / DISPLAYABILITY_CHANGED / SHOWING_CHANGED flags describing what about the hierarchy actually changed. Only meaningful for HIERARCHY_CHANGED; returns 0 for the ancestor-moved/resized events.
    • paramString

      public String paramString()
      Overrides:
      paramString in class SComponentEvent