类 Ansi

java.lang.Object
cool.scx.util.ansi.Ansi

public final class Ansi extends Object
向控制台打印彩色
版本:
0.0.1
作者:
scx567888
  • 方法详细资料

    • out

      public static Ansi out()

      out.

      返回:
      a Ansi object
    • encode

      public static String encode(AnsiElement element)
      Encode a single AnsiElement if output is enabled.
      参数:
      element - the element to encode
      返回:
      the encoded element or an empty string
    • toString

      public static String toString(Object... elements)
      Create a new ANSI string from the specified elements. Any AnsiElements will be encoded as required.
      参数:
      elements - the elements to encode
      返回:
      a string of the encoded elements
    • red

      public Ansi red(Object o, AnsiElement... ansiElements)
      红色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • green

      public Ansi green(Object o, AnsiElement... ansiElements)
      绿色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightCyan

      public Ansi brightCyan(Object o, AnsiElement... ansiElements)
      亮青色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • blue

      public Ansi blue(Object o, AnsiElement... ansiElements)
      蓝色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • cyan

      public Ansi cyan(Object o, AnsiElement... ansiElements)
      青色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightBlue

      public Ansi brightBlue(Object o, AnsiElement... ansiElements)
      亮蓝色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightMagenta

      public Ansi brightMagenta(Object o, AnsiElement... ansiElements)
      亮紫色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightRed

      public Ansi brightRed(Object o, AnsiElement... ansiElements)
      亮红色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightGreen

      public Ansi brightGreen(Object o, AnsiElement... ansiElements)
      亮绿色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • black

      public Ansi black(Object o, AnsiElement... ansiElements)
      黑色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightBlack

      public Ansi brightBlack(Object o, AnsiElement... ansiElements)
      亮黑色 ( 真的存在这种颜色吗 ? )
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightYellow

      public Ansi brightYellow(Object o, AnsiElement... ansiElements)
      亮黄色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • yellow

      public Ansi yellow(Object o, AnsiElement... ansiElements)
      黄色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • magenta

      public Ansi magenta(Object o, AnsiElement... ansiElements)
      紫色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • white

      public Ansi white(Object o, AnsiElement... ansiElements)
      白色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • brightWhite

      public Ansi brightWhite(Object o, AnsiElement... ansiElements)
      亮白色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • defaultColor

      public Ansi defaultColor(Object o, AnsiElement... ansiElements)
      默认颜色
      参数:
      o - a Object object.
      ansiElements - AnsiElements
      返回:
      Ansi 方便链式调用
    • ln

      public Ansi ln()
      换行
      返回:
      a Ansi object.
    • color

      public Ansi color(Object o, AnsiElement... ansiElements)
      向控制台打印输出 颜色根据内部计数器自动读取
      参数:
      o - a String object.
      ansiElements - AnsiElements
      返回:
      a Ansi object.
    • add

      public Ansi add(Object o, AnsiElement... ansiElements)
      a
      参数:
      o - a
      ansiElements - a
      返回:
      a
    • print

      public void print()

      print.

    • clear

      public void clear()
      清除当前的 所有 语句
    • println

      public void println()

      println.