Class SHierarchyEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
com.vaadin.swingbridge.surrogates.awt.event.SComponentEvent
com.vaadin.swingbridge.surrogates.awt.event.SHierarchyEvent
- All Implemented Interfaces:
Serializable
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 Summary
FieldsModifier and TypeFieldDescriptionstatic 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
ConstructorsConstructorDescriptionSHierarchyEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component changed, com.vaadin.flow.component.Component changedParent) SHierarchyEvent(com.vaadin.flow.component.Component source, int id, com.vaadin.flow.component.Component changed, com.vaadin.flow.component.Component changedParent, long changeFlags) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentThe component whose hierarchy state changed (may equal the source).com.vaadin.flow.component.ComponentThe parent ofchangedat the moment the event fires.longBit-or of thePARENT_CHANGED/DISPLAYABILITY_CHANGED/SHOWING_CHANGEDflags describing what about the hierarchy actually changed.Methods inherited from class SComponentEvent
getComponentMethods inherited from class EventObject
getSource
-
Field Details
-
ANCESTOR_MOVED
public static final int ANCESTOR_MOVED- See Also:
-
ANCESTOR_RESIZED
public static final int ANCESTOR_RESIZED- See Also:
-
DISPLAYABILITY_CHANGED
public static final int DISPLAYABILITY_CHANGED- See Also:
-
HIERARCHY_CHANGED
public static final int HIERARCHY_CHANGED- See Also:
-
HIERARCHY_FIRST
public static final int HIERARCHY_FIRST- See Also:
-
HIERARCHY_LAST
public static final int HIERARCHY_LAST- See Also:
-
PARENT_CHANGED
public static final int PARENT_CHANGED- See Also:
-
SHOWING_CHANGED
public static final int SHOWING_CHANGED- See Also:
-
-
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 ofchangedat the moment the event fires. ForHIERARCHY_CHANGEDon a newly-attached component this is the new parent; on a detach this is the old parent. JDK's contract is identical — seeHierarchyEvent.getChangedParent(). -
getChangeFlags
public long getChangeFlags()Bit-or of thePARENT_CHANGED/DISPLAYABILITY_CHANGED/SHOWING_CHANGEDflags describing what about the hierarchy actually changed. Only meaningful forHIERARCHY_CHANGED; returns 0 for the ancestor-moved/resized events. -
paramString
- Overrides:
paramStringin classSComponentEvent
-