Class Figlet


  • public class Figlet
    extends Object
    Figlet java implementation Documentation:
    Since:
    1.3.0
    Author:
    afarre
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String[] fillColumn​(String _column)  
      int length​(String _phrase)
      Calculate the length of the banner without compression
      int length​(String _phrase, boolean _compressed)
      Calculate the length of the banner
      String line​(String _phrase, boolean _compressed, char _filler)
      Returns an string with the same length of the _phrase but filled with _filler
      String line​(String _phrase, char _filler)
      Returns an string with the same length of the _phrase but filled with _filler without compression
      String print​(String _phrase)
      Returns an string that represents the _phrase using the loaded font
      String print​(String _phrase, boolean _compressed)
      Returns an string that represents the _phrase using the loaded font
      protected String[] render​(char _character, boolean _compressed)
      Renderizes any character if compressed is true removes first and last column
      protected String[] render​(String _phrase, boolean _compressed)
      Renderizes the given phrase if compressed is true then each character is renderized without the first and the last column
      protected String[] renderCharacter​(char _character, boolean _compressed)
      Renderizes a printable character if compressed is true removes first and last column
      protected String[] renderTab()
      Renderizes a tab character
    • Field Detail

      • blank

        protected final char blank
      • height

        protected final int height
    • Method Detail

      • fillColumn

        protected final String[] fillColumn​(String _column)
      • renderTab

        protected String[] renderTab()
        Renderizes a tab character
        Returns:
        list of string lines with the tab escape character
      • renderCharacter

        protected String[] renderCharacter​(char _character,
                                           boolean _compressed)
        Renderizes a printable character if compressed is true removes first and last column
        Parameters:
        _character - character to render
        _compressed - compressing flag (remove first and last columns)
        Returns:
        list of string that represents the scanlines of the given character
      • render

        protected String[] render​(char _character,
                                  boolean _compressed)
        Renderizes any character if compressed is true removes first and last column
        Parameters:
        _character - character to render
        _compressed - compressing flag (remove first and last columns)
        Returns:
        list of string that represents the scanlines of the given character
      • render

        protected String[] render​(String _phrase,
                                  boolean _compressed)
        Renderizes the given phrase if compressed is true then each character is renderized without the first and the last column
        Parameters:
        _phrase - phrase to render
        _compressed - compressing flag (remove first and last columns)
        Returns:
        list of string that represents the scanlines of the given phrase
      • print

        public String print​(String _phrase,
                            boolean _compressed)
        Returns an string that represents the _phrase using the loaded font
        Parameters:
        _phrase - phrase to represent
        _compressed - compressing flag (remove first and last columns)
        Returns:
        string that represents the phrase with the provided font
      • print

        public String print​(String _phrase)
        Returns an string that represents the _phrase using the loaded font
        Parameters:
        _phrase - phrase to represent
        Returns:
        string that represents the phrase with the provided font
      • length

        public int length​(String _phrase,
                          boolean _compressed)
        Calculate the length of the banner
        Parameters:
        _phrase - phrase to calculate length
        _compressed - if phrase must be considered compressed
        Returns:
        the length of the banner
      • length

        public int length​(String _phrase)
        Calculate the length of the banner without compression
        Parameters:
        _phrase - phrase to calculate length
        Returns:
        the length of the banner
      • line

        public String line​(String _phrase,
                           boolean _compressed,
                           char _filler)
        Returns an string with the same length of the _phrase but filled with _filler
        Parameters:
        _phrase - phrase to represent
        _compressed - if phrase must be considered compressed
        _filler - character to fill the same phrase length in the returned string
        Returns:
        string with the same length of the phrase corresponding banner but with only onle line filled with _filler
      • line

        public String line​(String _phrase,
                           char _filler)
        Returns an string with the same length of the _phrase but filled with _filler without compression
        Parameters:
        _phrase - phrase to represent
        _filler - character to fill the same phrase length in the returned string
        Returns:
        string with the same length of the phrase corresponding banner but with only onle line filled with _filler