Class TimelineModule
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.core.Module
io.mindspice.simplypages.modules.TimelineModule
- All Implemented Interfaces:
Component
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a timeline event with date, title, and custom content.Adds a timeline event with date, title, and description.protected voidComposes module structure.static TimelineModulecreate()Sets horizontal orientation.vertical()Sets vertical orientation (default).withModuleId(String moduleId) Sets module id and synchronizes the underlyingidattribute.Sets optional title consumed byModule.buildContent()implementations.Methods inherited from class Module
build, getModuleId, getTitle, invalidateContent, rebuildContent, render, render, withClass, withMaxWidth, withMinWidth, withWidthMethods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, withAttribute, withChild, withId, withInnerText, withInnerText, withUnsafeHtml
-
Constructor Details
-
TimelineModule
public TimelineModule()
-
-
Method Details
-
create
-
withTitle
Description copied from class:ModuleSets optional title consumed byModule.buildContent()implementations. -
withModuleId
Description copied from class:ModuleSets module id and synchronizes the underlyingidattribute.- Overrides:
withModuleIdin classModule
-
addEvent
Adds a timeline event with date, title, and description.- Parameters:
date- the date or timestamp for the eventeventTitle- the event titledescription- the event description
-
addEvent
Adds a timeline event with date, title, and custom content.- Parameters:
date- the date or timestamp for the eventeventTitle- the event titlecontent- custom component for event content
-
vertical
Sets vertical orientation (default). -
horizontal
Sets horizontal orientation. -
buildContent
protected void buildContent()Description copied from class:ModuleComposes module structure.Called at most once by
Module.build()unlessModule.rebuildContent()is invoked. Do not rely on this method for per-request mutation.- Specified by:
buildContentin classModule
-