Class WindowsTerminal
java.lang.Object
net.rubygrapefruit.platform.internal.AbstractTerminal
net.rubygrapefruit.platform.internal.WindowsTerminal
- All Implemented Interfaces:
Terminal
-
Nested Class Summary
Nested classes/interfaces inherited from interface Terminal
Terminal.Color -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbold()Switches the terminal to bold mode, if supported.Clears characters from the cursor position to the end of the current line.cursorDown(int count) Moves the cursor the given number of characters down.cursorLeft(int count) Moves the cursor the given number of characters to the left.cursorRight(int count) Moves the cursor the given number of characters to the right.Moves the cursor to the start of the current line.cursorUp(int count) Moves the cursor the given number of characters up.foreground(Terminal.Color color) Sets the terminal foreground color, if supported.Returns the size of the terminal.protected voidinit()normal()Switches the terminal to normal mode.reset()Switches the terminal to normal mode and restores default colors.booleanReturns true if this terminal supports setting output colors.booleanReturns true if this terminal supports moving the cursor.booleanReturns true if this terminal supports setting text attributes, such as bold.toString()
-
Constructor Details
-
WindowsTerminal
-
-
Method Details
-
toString
-
init
protected void init()- Specified by:
initin classAbstractTerminal
-
supportsColor
public boolean supportsColor()Description copied from interface:TerminalReturns true if this terminal supports setting output colors. -
supportsTextAttributes
public boolean supportsTextAttributes()Description copied from interface:TerminalReturns true if this terminal supports setting text attributes, such as bold. -
supportsCursorMotion
public boolean supportsCursorMotion()Description copied from interface:TerminalReturns true if this terminal supports moving the cursor. -
getTerminalSize
Description copied from interface:TerminalReturns the size of the terminal. Supported by all terminals.- Returns:
- The current terminal size. Never returns null.
-
bold
-
foreground
Description copied from interface:TerminalSets the terminal foreground color, if supported. Does nothing if this terminal does not support setting the foreground color. -
normal
-
reset
-
cursorDown
Description copied from interface:TerminalMoves the cursor the given number of characters down.- Throws:
NativeException- On failure, or if this terminal does not support cursor motion.
-
cursorUp
Description copied from interface:TerminalMoves the cursor the given number of characters up.- Throws:
NativeException- On failure, or if this terminal does not support cursor motion.
-
cursorLeft
Description copied from interface:TerminalMoves the cursor the given number of characters to the left.- Throws:
NativeException- On failure, or if this terminal does not support cursor motion.
-
cursorRight
Description copied from interface:TerminalMoves the cursor the given number of characters to the right.- Throws:
NativeException- On failure, or if this terminal does not support cursor motion.
-
cursorStartOfLine
Description copied from interface:TerminalMoves the cursor to the start of the current line.- Throws:
NativeException- On failure, or if this terminal does not support cursor motion.
-
clearToEndOfLine
Description copied from interface:TerminalClears characters from the cursor position to the end of the current line.- Throws:
NativeException- On failure, or if this terminal does not support clearing.
-