Package org.zkoss.calendar.impl
Class DefaultCalendarItem.Builder
- java.lang.Object
-
- org.zkoss.calendar.impl.DefaultCalendarItem.Builder
-
- Enclosing class:
- DefaultCalendarItem
public static class DefaultCalendarItem.Builder extends Object
TheDefaultCalendarItem.Builderfor creatingDefaultCalendarItem.- Since:
- 3.1.0
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
from
public static DefaultCalendarItem.Builder from(DefaultCalendarItem item)
Initialize builder with values from an existing DefaultCalendarItem- Parameters:
item- the existing DefaultCalendarItem to copy values from- Returns:
- a Builder initialized with the existing item's values
- Since:
- 3.2.0
-
withBegin
public DefaultCalendarItem.Builder withBegin(LocalDateTime begin)
-
withEnd
public DefaultCalendarItem.Builder withEnd(LocalDateTime end)
-
withZoneId
public DefaultCalendarItem.Builder withZoneId(ZoneId zoneId)
-
withTitle
public DefaultCalendarItem.Builder withTitle(String title)
-
withContent
public DefaultCalendarItem.Builder withContent(String content)
-
withHeaderColor
@Deprecated public DefaultCalendarItem.Builder withHeaderColor(String headerColor)
Deprecated.usewithHeaderColor(String)instead.set background color- Parameters:
headerColor- CSS accepted color code
-
withContentColor
@Deprecated public DefaultCalendarItem.Builder withContentColor(String contentColor)
Deprecated.usewithContent(String)instead.set background color- Parameters:
contentColor- CSS accepted color code
-
withSclass
public DefaultCalendarItem.Builder withSclass(String sclass)
This is useful to apply a predefined style on a set ofDefaultCalendarItem- Parameters:
sclass-- See Also:
withHeaderStyle(String),withContentStyle(String)
-
withLocked
public DefaultCalendarItem.Builder withLocked(boolean locked)
-
withHeaderStyle
public DefaultCalendarItem.Builder withHeaderStyle(String headerStyle)
Set the CSS style for the header. This method is useful for applying dynamic styles to specific calendar items without affecting other items or creating a CSS class. The component renders the specified style into an item's inline style (the highest priority). This method overrides the value set bywithHeaderColor(String), if you set both.- Parameters:
headerStyle- CSS style string- Since:
- 3.2.0
-
withContentStyle
public DefaultCalendarItem.Builder withContentStyle(String contentStyle)
Set the CSS style for the content. This method overrides the value set bywithContentColor(String)(String)}- Parameters:
contentStyle- CSS style string- Since:
- 3.2.0
- See Also:
withHeaderStyle(String)
-
build
public DefaultCalendarItem build()
-
-