Class TerminfoTerminal
java.lang.Object
net.rubygrapefruit.platform.internal.AbstractTerminal
net.rubygrapefruit.platform.internal.TerminfoTerminal
- 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
-
TerminfoTerminal
-
-
Method Details
-
toString
-
init
protected void init()- Specified by:
initin classAbstractTerminal
-
getTerminalSize
Description copied from interface:TerminalReturns the size of the terminal. Supported by all terminals.- Returns:
- The current terminal size. Never returns null.
-
supportsColor
public boolean supportsColor()Description copied from interface:TerminalReturns true if this terminal supports setting output colors. -
supportsCursorMotion
public boolean supportsCursorMotion()Description copied from interface:TerminalReturns true if this terminal supports moving the cursor. -
supportsTextAttributes
public boolean supportsTextAttributes()Description copied from interface:TerminalReturns true if this terminal supports setting text attributes, such as 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. -
bold
-
normal
-
reset
-
cursorDown
-
cursorUp
-
cursorLeft
-
cursorRight
-
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.
-