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.

  • Method Details

    • temporal

      static TemporalComponent.Builder temporal()
      Creates a new temporal component builder.
    • temporal

      static TemporalComponent temporal(Temporal temporal, TemporalStyle temporalStyle)
      Creates a new temporal component with the specified temporal value and temporal textStyle.
      Parameters:
      temporal - the temporal value
      temporalStyle - 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 value
      temporalStyle - the temporal textStyle
      textColor - 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 value
      temporalStyle - the temporal textStyle
      textStyle - the text textStyle
      Returns:
      the temporal component
    • temporal

      static TemporalComponent temporal(Temporal temporal)
      Creates a new temporal component with the specified temporal value.
      Parameters:
      temporal - the temporal value
      Returns:
      the temporal component
    • temporal

      static TemporalComponent temporal(Temporal temporal, ComponentColor textColor)
      Creates a new temporal component with the specified temporal value and text color.
      Parameters:
      temporal - the temporal value
      textColor - the text color
      Returns:
      the temporal component
    • temporal

      static TemporalComponent temporal(Temporal temporal, TextStyle textStyle)
      Creates a new temporal component with the specified temporal value and text textStyle.
      Parameters:
      temporal - the temporal value
      textStyle - 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.