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>
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:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedScreenSizeEvent(ChatAssistant<?> source, boolean fromClient, Integer widthThreshold, Integer heightThreshold, boolean aboveThreshold) -
Method Summary
Modifier and TypeMethodDescriptionConvenience view ofisAboveThreshold()as a direction.The configured height threshold in pixels, ornullif height was not tracked.The configured width threshold in pixels, ornullif width was not tracked.booleanReturnstruewhen the chat window is now at or above the threshold (it increased past it),falsewhen it is now below (it decreased under it).Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ScreenSizeEvent
protected ScreenSizeEvent(ChatAssistant<?> source, boolean fromClient, Integer widthThreshold, Integer heightThreshold, boolean aboveThreshold)
-
-
Method Details
-
getWidthThreshold
The configured width threshold in pixels, ornullif width was not tracked. -
getHeightThreshold
The configured height threshold in pixels, ornullif height was not tracked. -
isAboveThreshold
public boolean isAboveThreshold()Returnstruewhen the chat window is now at or above the threshold (it increased past it),falsewhen it is now below (it decreased under it). -
getDirection
Convenience view ofisAboveThreshold()as a direction.
-