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
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.component.html.Span
    createBucketCount(int count)
     
    protected com.vaadin.flow.component.html.Span
     
    protected com.vaadin.flow.component.orderedlayout.VerticalLayout
     
    protected com.vaadin.flow.component.orderedlayout.HorizontalLayout
    createHeader(String bucketLabel, int count)
    Header row: bucket label (e.g.
    protected com.vaadin.flow.component.orderedlayout.VerticalLayout
     
    void
    setGroup(String bucketLabel, List<AiConversation> conversations, Function<AiConversation,AiConversationCard> cardCreator)
     

    Methods inherited from class com.vaadin.flow.component.Composite

    getChildren, getContent, getElement

    Methods 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, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

  • Constructor Details

    • AiConversationHistoryGroup

      public AiConversationHistoryGroup()
  • Method Details

    • initContent

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()
      Overrides:
      initContent in class com.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 label
      count - number of conversations in the bucket
      Returns:
      the assembled header row
    • createBucketLabel

      protected com.vaadin.flow.component.html.Span createBucketLabel(String bucketLabel)
    • createBucketCount

      protected com.vaadin.flow.component.html.Span createBucketCount(int count)
    • createContent

      protected com.vaadin.flow.component.orderedlayout.VerticalLayout createContent()