Interface TemporalComponent
- All Superinterfaces:
BuildableComponent<TemporalComponent,,TemporalComponent.Builder> Component,ComponentLike
public interface TemporalComponent
extends BuildableComponent<TemporalComponent,TemporalComponent.Builder>
A component that displays a temporal value.
Can have additional styling with a TemporalStyle.
But keep in mind that if a non TemporalStyle.None textStyle is used, underlying implementations will not format the temporal value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for temporal components. -
Method Summary
Modifier and TypeMethodDescriptionReturns the temporal value contained in this component.Returns the temporal textStyle of this component.static TemporalComponent.Buildertemporal()Creates a new temporal component builder.static TemporalComponentCreates a new temporal component with the specified temporal value.static TemporalComponenttemporal(Temporal temporal, ComponentColor textColor) Creates a new temporal component with the specified temporal value and text color.static TemporalComponenttemporal(Temporal temporal, TemporalStyle temporalStyle) Creates a new temporal component with the specified temporal value and temporal textStyle.static TemporalComponenttemporal(Temporal temporal, TemporalStyle temporalStyle, ComponentColor textColor) Creates a new temporal component with the specified temporal value, temporal textStyle, and text color.static TemporalComponenttemporal(Temporal temporal, TemporalStyle temporalStyle, TextStyle textStyle) Creates a new temporal component with the specified temporal value, temporal textStyle, and text textStyle.static TemporalComponentCreates a new temporal component with the specified temporal value and text textStyle.Methods inherited from interface com.xpdustry.distributor.api.component.BuildableComponent
toBuilderMethods inherited from interface com.xpdustry.distributor.api.component.Component
append, asComponent, compress, getTextStyle
-
Method Details
-
temporal
Creates a new temporal component builder. -
temporal
Creates a new temporal component with the specified temporal value and temporal textStyle.- Parameters:
temporal- the temporal valuetemporalStyle- the temporal textStyle- Returns:
- the temporal component
-
temporal
static TemporalComponent temporal(Temporal temporal, TemporalStyle temporalStyle, ComponentColor textColor) Creates a new temporal component with the specified temporal value, temporal textStyle, and text color.- Parameters:
temporal- the temporal valuetemporalStyle- the temporal textStyletextColor- the text color- Returns:
- the temporal component
-
temporal
static TemporalComponent temporal(Temporal temporal, TemporalStyle temporalStyle, TextStyle textStyle) Creates a new temporal component with the specified temporal value, temporal textStyle, and text textStyle.- Parameters:
temporal- the temporal valuetemporalStyle- the temporal textStyletextStyle- the text textStyle- Returns:
- the temporal component
-
temporal
Creates a new temporal component with the specified temporal value.- Parameters:
temporal- the temporal value- Returns:
- the temporal component
-
temporal
Creates a new temporal component with the specified temporal value and text color.- Parameters:
temporal- the temporal valuetextColor- the text color- Returns:
- the temporal component
-
temporal
Creates a new temporal component with the specified temporal value and text textStyle.- Parameters:
temporal- the temporal valuetextStyle- the text textStyle- Returns:
- the temporal component
-
getTemporal
Temporal getTemporal()Returns the temporal value contained in this component. -
getTemporalStyle
TemporalStyle getTemporalStyle()Returns the temporal textStyle of this component.
-