Package org.fusesource.jansi
Class Ansi
java.lang.Object
org.fusesource.jansi.Ansi
- All Implemented Interfaces:
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).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Deprecated.Display attributes, also know as SGR (Select Graphic Rendition) parameters.static enum
Deprecated.ANSI 8 colors for fluent APIstatic interface
Deprecated.static enum
Deprecated.ED (Erase in Display) / EL (Erase in Line) parameter (see CSI sequence J and K) -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiona
(boolean value) Deprecated.a
(char value) Deprecated.a
(char[] value) Deprecated.a
(char[] value, int offset, int len) Deprecated.a
(double value) Deprecated.a
(float value) Deprecated.a
(int value) Deprecated.a
(long value) Deprecated.a
(CharSequence value) Deprecated.a
(CharSequence value, int start, int end) Deprecated.Deprecated.Deprecated.a
(StringBuffer value) Deprecated.a
(Ansi.Attribute attribute) Deprecated.static Ansi
ansi()
Deprecated.static Ansi
ansi
(int size) Deprecated.static Ansi
ansi
(StringBuilder builder) Deprecated.append
(char c) Deprecated.append
(CharSequence csq) Deprecated.append
(CharSequence csq, int start, int end) Deprecated.apply
(Ansi.Consumer fun) Deprecated.Applies another function to this Ansi instance.bg
(int color) Deprecated.bg
(Ansi.Color color) Deprecated.bgBright
(Ansi.Color color) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.bgCyan()
Deprecated.Deprecated.bgGreen()
Deprecated.Deprecated.bgRed()
Deprecated.bgRgb
(int color) Deprecated.bgRgb
(int r, int g, int b) Deprecated.bgYellow()
Deprecated.bold()
Deprecated.boldOff()
Deprecated.cursor
(int row, int column) Deprecated.Moves the cursor to row n, column m.cursorDown
(int y) Deprecated.Moves the cursor down.Deprecated.Moves the cursor to the beginning of the line below.cursorDownLine
(int n) Deprecated.Moves the cursor to the beginning of the n-th line below.cursorLeft
(int x) Deprecated.Moves the cursor left.cursorMove
(int x, int y) Deprecated.Moves the cursor relative to the current position.cursorRight
(int x) Deprecated.Moves the cursor right.cursorToColumn
(int x) Deprecated.Moves the cursor to column n.cursorUp
(int y) Deprecated.Moves the cursor up.Deprecated.Moves the cursor to the beginning of the line above.cursorUpLine
(int n) Deprecated.Moves the cursor to the beginning of the n-th line above.Deprecated.eraseLine
(Ansi.Erase kind) Deprecated.Deprecated.eraseScreen
(Ansi.Erase kind) Deprecated.fg
(int color) Deprecated.fg
(Ansi.Color color) Deprecated.fgBlack()
Deprecated.fgBlue()
Deprecated.fgBright
(Ansi.Color color) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.fgCyan()
Deprecated.Deprecated.fgGreen()
Deprecated.Deprecated.fgRed()
Deprecated.fgRgb
(int color) Deprecated.fgRgb
(int r, int g, int b) Deprecated.fgYellow()
Deprecated.Deprecated.static boolean
Deprecated.newline()
Deprecated.Deprecated.Uses theAnsiRenderer
to generate the ANSI escape sequences for the supplied text.Deprecated.String formats and renders the supplied arguments.reset()
Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.scrollDown
(int rows) Deprecated.scrollUp
(int rows) Deprecated.static void
setEnabled
(boolean flag) Deprecated.toString()
Deprecated.
-
Constructor Details
-
Ansi
public Ansi()Deprecated. -
Ansi
Deprecated. -
Ansi
public Ansi(int size) Deprecated. -
Ansi
Deprecated.
-
-
Method Details
-
isEnabled
public static boolean isEnabled()Deprecated. -
setEnabled
public static void setEnabled(boolean flag) Deprecated. -
ansi
Deprecated. -
ansi
Deprecated. -
ansi
Deprecated. -
fg
Deprecated. -
fg
Deprecated. -
fgRgb
Deprecated. -
fgRgb
Deprecated. -
fgBlack
Deprecated. -
fgBlue
Deprecated. -
fgCyan
Deprecated. -
fgDefault
Deprecated. -
fgGreen
Deprecated. -
fgMagenta
Deprecated. -
fgRed
Deprecated. -
fgYellow
Deprecated. -
bg
Deprecated. -
bg
Deprecated. -
bgRgb
Deprecated. -
bgRgb
Deprecated. -
bgCyan
Deprecated. -
bgDefault
Deprecated. -
bgGreen
Deprecated. -
bgMagenta
Deprecated. -
bgRed
Deprecated. -
bgYellow
Deprecated. -
fgBright
Deprecated. -
fgBrightBlack
Deprecated. -
fgBrightBlue
Deprecated. -
fgBrightCyan
Deprecated. -
fgBrightDefault
Deprecated. -
fgBrightGreen
Deprecated. -
fgBrightMagenta
Deprecated. -
fgBrightRed
Deprecated. -
fgBrightYellow
Deprecated. -
bgBright
Deprecated. -
bgBrightCyan
Deprecated. -
bgBrightDefault
Deprecated. -
bgBrightGreen
Deprecated. -
bgBrightMagenta
Deprecated. -
bgBrightRed
Deprecated. -
bgBrightYellow
Deprecated. -
a
Deprecated. -
cursor
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 topcolumn
- column (1 based) from left- Returns:
- this Ansi instance
-
cursorToColumn
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
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
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
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
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
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 horizontallyy
- the number of lines to move vertically- Returns:
- this Ansi instance
- Since:
- 2.2
-
cursorDownLine
Deprecated.Moves the cursor to the beginning of the line below.- Returns:
- this Ansi instance
-
cursorDownLine
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
Deprecated.Moves the cursor to the beginning of the line above.- Returns:
- this Ansi instance
-
cursorUpLine
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
Deprecated. -
eraseScreen
Deprecated. -
eraseLine
Deprecated. -
eraseLine
Deprecated. -
scrollUp
Deprecated. -
scrollDown
Deprecated. -
restorCursorPosition
Deprecated. -
saveCursorPosition
Deprecated. -
saveCursorPositionSCO
Deprecated. -
saveCursorPositionDEC
Deprecated. -
restoreCursorPosition
Deprecated. -
restoreCursorPositionSCO
Deprecated. -
restoreCursorPositionDEC
Deprecated. -
reset
Deprecated. -
bold
Deprecated. -
boldOff
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
a
Deprecated. -
newline
Deprecated. -
format
Deprecated. -
apply
Deprecated.Applies another function to this Ansi instance.- Parameters:
fun
- the function to apply- Returns:
- this Ansi instance
- Since:
- 2.2
-
render
Deprecated.Uses theAnsiRenderer
to generate the ANSI escape sequences for the supplied text.- Parameters:
text
- text- Returns:
- this
- Since:
- 2.2
-
render
Deprecated.String formats and renders the supplied arguments. Uses theAnsiRenderer
to generate the ANSI escape sequences.- Parameters:
text
- formatargs
- arguments- Returns:
- this
- Since:
- 2.2
-
toString
Deprecated. -
append
Deprecated.- Specified by:
append
in interfaceAppendable
-
append
Deprecated.- Specified by:
append
in interfaceAppendable
-
append
Deprecated.- Specified by:
append
in interfaceAppendable
-