Class Ansi

java.lang.Object
org.fusesource.jansi.Ansi
All Implemented Interfaces:
Appendable

@Deprecated public class Ansi extends Object implements Appendable
Deprecated.
Provides a fluent API for generating ANSI escape sequences. This class comes from Jansi and is provided for backward compatibility with maven-shared-utils, while Maven has migrated to JLine (into which Jansi has been merged since JLine 3.25.0).
  • Constructor Details

    • Ansi

      public Ansi()
      Deprecated.
    • Ansi

      public Ansi(Ansi parent)
      Deprecated.
    • Ansi

      public Ansi(int size)
      Deprecated.
    • Ansi

      public Ansi(StringBuilder builder)
      Deprecated.
  • Method Details

    • isEnabled

      public static boolean isEnabled()
      Deprecated.
    • setEnabled

      public static void setEnabled(boolean flag)
      Deprecated.
    • ansi

      public static Ansi ansi()
      Deprecated.
    • ansi

      public static Ansi ansi(StringBuilder builder)
      Deprecated.
    • ansi

      public static Ansi ansi(int size)
      Deprecated.
    • fg

      public Ansi fg(Ansi.Color color)
      Deprecated.
    • fg

      public Ansi fg(int color)
      Deprecated.
    • fgRgb

      public Ansi fgRgb(int color)
      Deprecated.
    • fgRgb

      public Ansi fgRgb(int r, int g, int b)
      Deprecated.
    • fgBlack

      public Ansi fgBlack()
      Deprecated.
    • fgBlue

      public Ansi fgBlue()
      Deprecated.
    • fgCyan

      public Ansi fgCyan()
      Deprecated.
    • fgDefault

      public Ansi fgDefault()
      Deprecated.
    • fgGreen

      public Ansi fgGreen()
      Deprecated.
    • fgMagenta

      public Ansi fgMagenta()
      Deprecated.
    • fgRed

      public Ansi fgRed()
      Deprecated.
    • fgYellow

      public Ansi fgYellow()
      Deprecated.
    • bg

      public Ansi bg(Ansi.Color color)
      Deprecated.
    • bg

      public Ansi bg(int color)
      Deprecated.
    • bgRgb

      public Ansi bgRgb(int color)
      Deprecated.
    • bgRgb

      public Ansi bgRgb(int r, int g, int b)
      Deprecated.
    • bgCyan

      public Ansi bgCyan()
      Deprecated.
    • bgDefault

      public Ansi bgDefault()
      Deprecated.
    • bgGreen

      public Ansi bgGreen()
      Deprecated.
    • bgMagenta

      public Ansi bgMagenta()
      Deprecated.
    • bgRed

      public Ansi bgRed()
      Deprecated.
    • bgYellow

      public Ansi bgYellow()
      Deprecated.
    • fgBright

      public Ansi fgBright(Ansi.Color color)
      Deprecated.
    • fgBrightBlack

      public Ansi fgBrightBlack()
      Deprecated.
    • fgBrightBlue

      public Ansi fgBrightBlue()
      Deprecated.
    • fgBrightCyan

      public Ansi fgBrightCyan()
      Deprecated.
    • fgBrightDefault

      public Ansi fgBrightDefault()
      Deprecated.
    • fgBrightGreen

      public Ansi fgBrightGreen()
      Deprecated.
    • fgBrightMagenta

      public Ansi fgBrightMagenta()
      Deprecated.
    • fgBrightRed

      public Ansi fgBrightRed()
      Deprecated.
    • fgBrightYellow

      public Ansi fgBrightYellow()
      Deprecated.
    • bgBright

      public Ansi bgBright(Ansi.Color color)
      Deprecated.
    • bgBrightCyan

      public Ansi bgBrightCyan()
      Deprecated.
    • bgBrightDefault

      public Ansi bgBrightDefault()
      Deprecated.
    • bgBrightGreen

      public Ansi bgBrightGreen()
      Deprecated.
    • bgBrightMagenta

      public Ansi bgBrightMagenta()
      Deprecated.
    • bgBrightRed

      public Ansi bgBrightRed()
      Deprecated.
    • bgBrightYellow

      public Ansi bgBrightYellow()
      Deprecated.
    • a

      public Ansi a(Ansi.Attribute attribute)
      Deprecated.
    • cursor

      public Ansi cursor(int row, int column)
      Deprecated.
      Moves the cursor to row n, column m. The values are 1-based. Any values less than 1 are mapped to 1.
      Parameters:
      row - row (1-based) from top
      column - column (1 based) from left
      Returns:
      this Ansi instance
    • cursorToColumn

      public Ansi cursorToColumn(int x)
      Deprecated.
      Moves the cursor to column n. The parameter n is 1-based. If n is less than 1 it is moved to the first column.
      Parameters:
      x - the index (1-based) of the column to move to
      Returns:
      this Ansi instance
    • cursorUp

      public Ansi cursorUp(int y)
      Deprecated.
      Moves the cursor up. If the parameter y is negative it moves the cursor down.
      Parameters:
      y - the number of lines to move up
      Returns:
      this Ansi instance
    • cursorDown

      public Ansi cursorDown(int y)
      Deprecated.
      Moves the cursor down. If the parameter y is negative it moves the cursor up.
      Parameters:
      y - the number of lines to move down
      Returns:
      this Ansi instance
    • cursorRight

      public Ansi cursorRight(int x)
      Deprecated.
      Moves the cursor right. If the parameter x is negative it moves the cursor left.
      Parameters:
      x - the number of characters to move right
      Returns:
      this Ansi instance
    • cursorLeft

      public Ansi cursorLeft(int x)
      Deprecated.
      Moves the cursor left. If the parameter x is negative it moves the cursor right.
      Parameters:
      x - the number of characters to move left
      Returns:
      this Ansi instance
    • cursorMove

      public Ansi cursorMove(int x, int y)
      Deprecated.
      Moves the cursor relative to the current position. The cursor is moved right if x is positive, left if negative and down if y is positive and up if negative.
      Parameters:
      x - the number of characters to move horizontally
      y - the number of lines to move vertically
      Returns:
      this Ansi instance
      Since:
      2.2
    • cursorDownLine

      public Ansi cursorDownLine()
      Deprecated.
      Moves the cursor to the beginning of the line below.
      Returns:
      this Ansi instance
    • cursorDownLine

      public Ansi cursorDownLine(int n)
      Deprecated.
      Moves the cursor to the beginning of the n-th line below. If the parameter n is negative it moves the cursor to the beginning of the n-th line above.
      Parameters:
      n - the number of lines to move the cursor
      Returns:
      this Ansi instance
    • cursorUpLine

      public Ansi cursorUpLine()
      Deprecated.
      Moves the cursor to the beginning of the line above.
      Returns:
      this Ansi instance
    • cursorUpLine

      public Ansi cursorUpLine(int n)
      Deprecated.
      Moves the cursor to the beginning of the n-th line above. If the parameter n is negative it moves the cursor to the beginning of the n-th line below.
      Parameters:
      n - the number of lines to move the cursor
      Returns:
      this Ansi instance
    • eraseScreen

      public Ansi eraseScreen()
      Deprecated.
    • eraseScreen

      public Ansi eraseScreen(Ansi.Erase kind)
      Deprecated.
    • eraseLine

      public Ansi eraseLine()
      Deprecated.
    • eraseLine

      public Ansi eraseLine(Ansi.Erase kind)
      Deprecated.
    • scrollUp

      public Ansi scrollUp(int rows)
      Deprecated.
    • scrollDown

      public Ansi scrollDown(int rows)
      Deprecated.
    • restorCursorPosition

      @Deprecated public Ansi restorCursorPosition()
      Deprecated.
    • saveCursorPosition

      public Ansi saveCursorPosition()
      Deprecated.
    • saveCursorPositionSCO

      public Ansi saveCursorPositionSCO()
      Deprecated.
    • saveCursorPositionDEC

      public Ansi saveCursorPositionDEC()
      Deprecated.
    • restoreCursorPosition

      public Ansi restoreCursorPosition()
      Deprecated.
    • restoreCursorPositionSCO

      public Ansi restoreCursorPositionSCO()
      Deprecated.
    • restoreCursorPositionDEC

      public Ansi restoreCursorPositionDEC()
      Deprecated.
    • reset

      public Ansi reset()
      Deprecated.
    • bold

      public Ansi bold()
      Deprecated.
    • boldOff

      public Ansi boldOff()
      Deprecated.
    • a

      public Ansi a(String value)
      Deprecated.
    • a

      public Ansi a(boolean value)
      Deprecated.
    • a

      public Ansi a(char value)
      Deprecated.
    • a

      public Ansi a(char[] value, int offset, int len)
      Deprecated.
    • a

      public Ansi a(char[] value)
      Deprecated.
    • a

      public Ansi a(CharSequence value, int start, int end)
      Deprecated.
    • a

      public Ansi a(CharSequence value)
      Deprecated.
    • a

      public Ansi a(double value)
      Deprecated.
    • a

      public Ansi a(float value)
      Deprecated.
    • a

      public Ansi a(int value)
      Deprecated.
    • a

      public Ansi a(long value)
      Deprecated.
    • a

      public Ansi a(Object value)
      Deprecated.
    • a

      public Ansi a(StringBuffer value)
      Deprecated.
    • newline

      public Ansi newline()
      Deprecated.
    • format

      public Ansi format(String pattern, Object... args)
      Deprecated.
    • apply

      public Ansi apply(Ansi.Consumer fun)
      Deprecated.
      Applies another function to this Ansi instance.
      Parameters:
      fun - the function to apply
      Returns:
      this Ansi instance
      Since:
      2.2
    • render

      public Ansi render(String text)
      Deprecated.
      Uses the AnsiRenderer to generate the ANSI escape sequences for the supplied text.
      Parameters:
      text - text
      Returns:
      this
      Since:
      2.2
    • render

      public Ansi render(String text, Object... args)
      Deprecated.
      String formats and renders the supplied arguments. Uses the AnsiRenderer to generate the ANSI escape sequences.
      Parameters:
      text - format
      args - arguments
      Returns:
      this
      Since:
      2.2
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • append

      public Ansi append(CharSequence csq)
      Deprecated.
      Specified by:
      append in interface Appendable
    • append

      public Ansi append(CharSequence csq, int start, int end)
      Deprecated.
      Specified by:
      append in interface Appendable
    • append

      public Ansi append(char c)
      Deprecated.
      Specified by:
      append in interface Appendable