Class ReceiptPrinter

Object
ReceiptPrinter

public class ReceiptPrinter extends Object
A visual effect to emulate the feel of printing a receipt with a dot matrix printer. Instead of showing all texts at once, it prints it out at about 30ms per character.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    This class should only be used statically with the print(String) method.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    print(String contents)
    Invoke this to print text character by character, emulating the effect of a dot matrix printer.

    Methods inherited from class Object

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

    • ReceiptPrinter

      private ReceiptPrinter()
      This class should only be used statically with the print(String) method.
  • Method Details

    • print

      public static void print(String contents)
      Invoke this to print text character by character, emulating the effect of a dot matrix printer.
      Parameters:
      contents - The text to be printed.