Class TimelineModule

All Implemented Interfaces:
Component

public class TimelineModule extends Module
Module for rendering chronological events in vertical or horizontal orientation.

Mutability and thread-safety: mutable and not thread-safe. Mutate within a request-scoped flow. For reuse, stop mutating shared instances and render stable structures with per-request context data.

  • Constructor Details

    • TimelineModule

      public TimelineModule()
  • Method Details

    • create

      public static TimelineModule create()
    • withTitle

      public TimelineModule withTitle(String title)
      Description copied from class: Module
      Sets optional title consumed by Module.buildContent() implementations.
      Overrides:
      withTitle in class Module
    • withModuleId

      public TimelineModule withModuleId(String moduleId)
      Description copied from class: Module
      Sets module id and synchronizes the underlying id attribute.
      Overrides:
      withModuleId in class Module
    • addEvent

      public TimelineModule addEvent(String date, String eventTitle, String description)
      Adds a timeline event with date, title, and description.
      Parameters:
      date - the date or timestamp for the event
      eventTitle - the event title
      description - the event description
    • addEvent

      public TimelineModule addEvent(String date, String eventTitle, Component content)
      Adds a timeline event with date, title, and custom content.
      Parameters:
      date - the date or timestamp for the event
      eventTitle - the event title
      content - custom component for event content
    • vertical

      public TimelineModule vertical()
      Sets vertical orientation (default).
    • horizontal

      public TimelineModule horizontal()
      Sets horizontal orientation.
    • buildContent

      protected void buildContent()
      Description copied from class: Module
      Composes module structure.

      Called at most once by Module.build() unless Module.rebuildContent() is invoked. Do not rely on this method for per-request mutation.

      Specified by:
      buildContent in class Module