[11:14] static
extends: object
Jansi is a small ASL 2.0 licensed Java library that allows you to use ANSI escape sequences to format your console output.
systemInstall ()
Installs the jansi system.
this
objectsystemUninstall ()
Unistalls the jansi system.
this
objectprintln (Val
)
Prints a line with the provided value.
Val
is the value to print. @ this objectgetTermWidth ()
Gets the terminal width.
An
int with the width.[60:7] extends: object
The ansi class provides a fluent API for generating ANSI escape sequences.
ansi ()
Constructor creates a new ansi object and stores the Java object as this.obj.
a (Val
)
Appends the provided value.
Val
is the value to append.this
objecteraseScreen ()
Erases the screen.
this
objecteraseLine ()
Erases the current line.
this
objectcursor (int row, int col
)
Moves the cursor to the provided location.
row
is an int with the row number from the top of the screen.col
is an int with the column number from the left side of the screen.this
objectbg (int red, int green, int blue
)
Sets the background color with the provided RGB value.
red
is an int with the red part.green
is an int with the green part.blue
is an int with the blue part.this
objectbold ()
Turns on bold.
this
objectboldOff ()
Turns off bold.
this
objectfg (int red, int green, int blue
)
Sets the foreground color with the provided RGB value.
red
is an int with the red part.green
is an int with the green part.blue
is an int with the blue part.this
objectscrollDown (int rows
)
Scrolls the screen down.
this
objectscrollUp (int rows
)
Scrolls the screen up.
this
object