Class EventCategory
java.lang.Object
org.apache.juneau.console.widgets.EventCategory
A declared calendar event category — a legend entry and the color family its events paint with.
The color is a fixed token family (EventCategory.CategoryColor), never an author-supplied inline color, so the emitted
markup only ever carries a jc-cal-cat--{blue|green|amber|red|neutral} class built from the
sanitized id/color — no CSS-value injection surface. Legend text and tooltip are painted with
textContent.
- Since:
- 10.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe fixed category color families, each mapped to an existing--jc-tag-*token family. -
Field Summary
FieldsModifier and TypeFieldDescriptionFixed token family; defaults toEventCategory.CategoryColor.NEUTRAL.Optional legend tooltip; painted withtextContent.Stable, unique id; charset[A-Za-z][A-Za-z0-9_-]*; drives the color class.Legend text; painted withtextContent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor(EventCategory.CategoryColor value) Sets the color family.static EventCategorycreate()Creates an empty category.description(String value) Sets the legend tooltip.The effective color family — the declaredcolororEventCategory.CategoryColor.NEUTRALwhen unset.Sets the id.Sets the legend label.
-
Field Details
-
id
Stable, unique id; charset[A-Za-z][A-Za-z0-9_-]*; drives the color class. -
label
Legend text; painted withtextContent. -
color
Fixed token family; defaults toEventCategory.CategoryColor.NEUTRAL. -
description
Optional legend tooltip; painted withtextContent.
-
-
Constructor Details
-
EventCategory
public EventCategory()
-
-
Method Details
-
create
Creates an empty category.- Returns:
- A new
EventCategory.
-
id
Sets the id.- Parameters:
value- The id. Must match[A-Za-z][A-Za-z0-9_-]*.- Returns:
- This object.
-
label
Sets the legend label.- Parameters:
value- The label. Must not benull or blank.- Returns:
- This object.
-
color
Sets the color family.- Parameters:
value- The color family.- Returns:
- This object.
-
description
Sets the legend tooltip.- Parameters:
value- The tooltip.- Returns:
- This object.
-
effectiveColor
The effective color family — the declaredcolororEventCategory.CategoryColor.NEUTRALwhen unset.- Returns:
- The effective color family.
-