Class TextChain

All Implemented Interfaces:
DirectedGraphNode<TUIModule.Property,TUIModule.Builder<?>,TextChain>

public class TextChain extends ModuleTemplate<TextChain>
Simplifies chaining text together that is meant to live on the same line. Ansi is supported with method overloads (e.g., addText(String, Ansi)).

Usage:

 LineBuilder text = LineBuilder.builder("name")
     .addText("Regular text: ")
     // this will display what the inputted module outputs
     .addModuleOutput("This string is the name of another module")
     .newLine() // end of line 1
     .addText("Text on the next line.")
     .newLine(); // end of line 2
 
  • Field Details

    • iterator

      protected int iterator
      Appended to the name of every new TextModule and incremented. The name of every text module follows "[LineBuilder name]-main-[iterator]".
  • Constructor Details

    • TextChain

      protected TextChain(String name)
    • TextChain

      protected TextChain()
  • Method Details