Class AiConversationHistoryGroup
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.aitoolsflowui.view.chathub.component.AiConversationHistoryGroup
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
@NullMarked
public class AiConversationHistoryGroup
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
One date-bucket section of the conversation history: a header (label + count)
followed by the conversation cards built by the supplied factory.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.vaadin.flow.component.html.SpancreateBucketCount(int count) protected com.vaadin.flow.component.html.SpancreateBucketLabel(String bucketLabel) protected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected com.vaadin.flow.component.orderedlayout.HorizontalLayoutcreateHeader(String bucketLabel, int count) Header row: bucket label (e.g.protected com.vaadin.flow.component.orderedlayout.VerticalLayoutvoidsetGroup(String bucketLabel, List<AiConversation> conversations, Function<AiConversation, AiConversationCard> cardCreator) Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
BASE_CN
- See Also:
-
HEADER_CN
- See Also:
-
COUNT_CN
- See Also:
-
LABEL_CN
- See Also:
-
-
Constructor Details
-
AiConversationHistoryGroup
public AiConversationHistoryGroup()
-
-
Method Details
-
initContent
protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()- Overrides:
initContentin classcom.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
-
setGroup
public void setGroup(String bucketLabel, List<AiConversation> conversations, Function<AiConversation, AiConversationCard> cardCreator) -
createHeader
protected com.vaadin.flow.component.orderedlayout.HorizontalLayout createHeader(String bucketLabel, int count) Header row: bucket label (e.g. "TODAY") followed by the count badge.- Parameters:
bucketLabel- localized bucket labelcount- number of conversations in the bucket- Returns:
- the assembled header row
-
createBucketLabel
-
createBucketCount
protected com.vaadin.flow.component.html.Span createBucketCount(int count) -
createContent
protected com.vaadin.flow.component.orderedlayout.VerticalLayout createContent()
-