Class Cursor
- java.lang.Object
-
- com.esturafd.jtoolkit.console.ansi.Cursor
-
public class Cursor extends java.lang.ObjectHelp class in handling the cursor in an ANSI console, if the output corresponds to an ANSI compatible console (Linux), to move the course it can be done in this way:
System.out.prinln(Cursor.up(2));
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Sequencebackward(int count)Move the cursor {count} lines to leftstatic Sequencedown(int count)Move cursor down {count} linesstatic Sequenceforward(int count)Move the cursor {count} lines to rightstatic Sequencehome(int row, int column)Move the cursor home to the coordinates {row}, {column}static Sequenceup(int count)Move cursor up {count} lines
-
-
-
Method Detail
-
home
public static Sequence home(int row, int column)
Move the cursor home to the coordinates {row}, {column}- Parameters:
row-column-- Returns:
- Action sequence to be interpreted by the console
-
up
public static Sequence up(int count)
Move cursor up {count} lines- Parameters:
count- Number of lines to move up- Returns:
- Action sequence to be interpreted by the console
-
down
public static Sequence down(int count)
Move cursor down {count} lines- Parameters:
count- Number of lines to move down- Returns:
- Action sequence to be interpreted by the console
-
forward
public static Sequence forward(int count)
Move the cursor {count} lines to right- Parameters:
count- Number of spaces to move to right- Returns:
- Action sequence to be interpreted by the console
-
backward
public static Sequence backward(int count)
Move the cursor {count} lines to left- Parameters:
count- Number of spaces to move to left- Returns:
- Action sequence to be interpreted by the console
-
-