Module sc2002_fypms
Package utils

Class TextDecorationUtils


  • public class TextDecorationUtils
    extends java.lang.Object
    The TextDecorationUtils class provides utility methods for providing text decoration in the console display for the whole application.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BOLD
      BOLD constant ANSI escape codes for bold text.
      static java.lang.String ITALIC
      ITALIC constant ANSI escape codes for italic text.
      static java.lang.String RESET_CODE
      RESET_CODE ANSI reset code.
      static java.lang.String UNDERLINE
      UNDERLINE constant ANSI escape codes for underline text.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String boldText​(java.lang.String text)
      Formats a string to be bolded.
      static java.lang.String italicText​(java.lang.String text)
      Formats a string to be italic.
      static java.lang.String underlineText​(java.lang.String text)
      Formats a string to be underlined.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextDecorationUtils

        public TextDecorationUtils()
    • Method Detail

      • underlineText

        public static java.lang.String underlineText​(java.lang.String text)
        Formats a string to be underlined.
        Parameters:
        text - the string to be formatted
        Returns:
        the underlined string
      • boldText

        public static java.lang.String boldText​(java.lang.String text)
        Formats a string to be bolded.
        Parameters:
        text - the string to be formatted
        Returns:
        the bolded string
      • italicText

        public static java.lang.String italicText​(java.lang.String text)
        Formats a string to be italic.
        Parameters:
        text - the string to be formatted
        Returns:
        the italic string