Interface ColorFormatter

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void endStyle​(java.lang.Appendable appendable)  
      boolean isColorEnabled()  
      default void println​(java.lang.Appendable appendable, java.lang.String text, Style... styles)
      Print a styled line of text to the given appendable.
      void startStyle​(java.lang.Appendable appendable, Style... style)  
      default void style​(java.lang.Appendable appendable, java.lang.String text, Style... styles)
      Styles text using the given styles and writes it to an Appendable.
      default java.lang.String style​(java.lang.String text, Style... styles)
      Styles text using the given styles.
    • Method Detail

      • style

        default java.lang.String style​(java.lang.String text,
                                       Style... styles)
        Styles text using the given styles.
        Parameters:
        text - Text to style.
        styles - Styles to apply.
        Returns:
        Returns the styled text.
      • style

        default void style​(java.lang.Appendable appendable,
                           java.lang.String text,
                           Style... styles)
        Styles text using the given styles and writes it to an Appendable.
        Parameters:
        appendable - Where to write styled text.
        text - Text to write.
        styles - Styles to apply.
      • println

        default void println​(java.lang.Appendable appendable,
                             java.lang.String text,
                             Style... styles)
        Print a styled line of text to the given appendable.
        Parameters:
        appendable - Where to write.
        text - Text to write.
        styles - Styles to apply.
      • isColorEnabled

        boolean isColorEnabled()
        Returns:
        Returns true if this formatter supports color output.
      • startStyle

        void startStyle​(java.lang.Appendable appendable,
                        Style... style)
      • endStyle

        void endStyle​(java.lang.Appendable appendable)