Class Justif


  • public class Justif
    extends java.lang.Object
    Formatter. This formatter allows you to build up an input string and then wraps the text. The following markup is available
    • $- - Line over the remaining width
    • \\t[0-9] - Go to tab position, and set indent to that position
    • \\f - Newlin
    • Constructor Summary

      Constructors 
      Constructor Description
      Justif()  
      Justif​(int width, int... tabs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void entry​(java.lang.String key, java.lang.String separator, java.lang.Object value)  
      java.util.Formatter formatter()  
      void indent​(int indent, java.lang.String string)  
      void table​(java.util.Map<?,​?> table, java.lang.String separator)  
      java.lang.String toString()  
      java.lang.String toString​(java.lang.Object o)  
      java.lang.String wrap()  
      void wrap​(java.lang.StringBuilder sb)
      Routine to wrap a stringbuffer.
      • Methods inherited from class java.lang.Object

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

      • Justif

        public Justif​(int width,
                      int... tabs)
      • Justif

        public Justif()
    • Method Detail

      • wrap

        public void wrap​(java.lang.StringBuilder sb)
        Routine to wrap a stringbuffer. Basically adds line endings but has the following control characters:
        • Space at the beginnng of a line is repeated when wrapped for indent.
        • A tab will mark the current position and wrapping will return to that position
        • A form feed in a tabbed colum will break but stay in the column
        Parameters:
        sb -
      • wrap

        public java.lang.String wrap()
      • formatter

        public java.util.Formatter formatter()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • indent

        public void indent​(int indent,
                           java.lang.String string)
      • entry

        public void entry​(java.lang.String key,
                          java.lang.String separator,
                          java.lang.Object value)
      • table

        public void table​(java.util.Map<?,​?> table,
                          java.lang.String separator)
      • toString

        public java.lang.String toString​(java.lang.Object o)