Class ComponentObservationEvent

    • Constructor Detail

      • ComponentObservationEvent

        public ComponentObservationEvent​(ComponentObserver source,
                                         com.vaadin.flow.component.Component observedComponent,
                                         double visibilityRange)
        Constructs a prototypical Event.
        Parameters:
        source - The object on which the Event initially occurred
        observedComponent - Component that was observed.
        visibilityRange - Visibility range when the event happened.
        Throws:
        IllegalArgumentException - if source is null
    • Method Detail

      • getObservedComponent

        public com.vaadin.flow.component.Component getObservedComponent()
        Returns the component that has been observed.
        Returns:
        A Component.
      • getVisibilityRange

        public double getVisibilityRange()
        Returns the visibility range that happened to the observed component.
        Returns:
        A number between 0 and 1, close to one of the registered visibility ranges.
      • isNotVisible

        public final boolean isNotVisible()
        Helper method for checking if the observed component is no longer visible.
        Returns:
        getVisibilityRange() == 0.0d
      • isFullyVisible

        public final boolean isFullyVisible()
        Helper method for checking if the observed component is fully visible.
        Returns:
        getVisibilityRange() == 1.0d