Class ChatAssistant.ScreenSizeEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<ChatAssistant<?>>
com.flowingcode.vaadin.addons.chatassistant.ChatAssistant.ScreenSizeEvent
All Implemented Interfaces:
Serializable
Enclosing class:
ChatAssistant<T extends Message>

public static class ChatAssistant.ScreenSizeEvent extends ComponentEvent<ChatAssistant<?>>
Event fired when the chat window's size crosses a width and/or height threshold registered through ChatAssistant.addScreenSizeListener(Integer, Integer, ComponentEventListener). It reports the crossing direction and the configured threshold(s); no live size is exposed.
Since:
5.1.0
See Also:
  • Constructor Details

    • ScreenSizeEvent

      protected ScreenSizeEvent(ChatAssistant<?> source, boolean fromClient, Integer widthThreshold, Integer heightThreshold, boolean aboveThreshold)
  • Method Details

    • getWidthThreshold

      public Integer getWidthThreshold()
      The configured width threshold in pixels, or null if width was not tracked.
    • getHeightThreshold

      public Integer getHeightThreshold()
      The configured height threshold in pixels, or null if height was not tracked.
    • isAboveThreshold

      public boolean isAboveThreshold()
      Returns true when the chat window is now at or above the threshold (it increased past it), false when it is now below (it decreased under it).
    • getDirection

      public ChatAssistant.ScreenSizeDirection getDirection()
      Convenience view of isAboveThreshold() as a direction.