Package software.amazon.smithy.cli
Interface ColorFormatter
- 
- All Known Implementing Classes:
- AnsiColorFormatter
 
 public interface ColorFormatterStyles text using color codes.- See Also:
- for the ANSI implementation.
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidendStyle(java.lang.Appendable appendable)booleanisColorEnabled()default voidprintln(java.lang.Appendable appendable, java.lang.String text, Style... styles)Print a styled line of text to the givenappendable.voidstartStyle(java.lang.Appendable appendable, Style... style)default voidstyle(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.Stringstyle(java.lang.String text, Style... styles)Styles text using the given styles.
 
- 
- 
- 
Method Detail- 
styledefault 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.
 
 - 
styledefault 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.
 
 - 
printlndefault void println(java.lang.Appendable appendable, java.lang.String text, Style... styles)Print a styled line of text to the givenappendable.- Parameters:
- appendable- Where to write.
- text- Text to write.
- styles- Styles to apply.
 
 - 
isColorEnabledboolean isColorEnabled() - Returns:
- Returns true if this formatter supports color output.
 
 - 
startStylevoid startStyle(java.lang.Appendable appendable, Style... style)
 - 
endStylevoid endStyle(java.lang.Appendable appendable) 
 
- 
 
-