Package jline
Class AnsiWindowsTerminal
java.lang.Object
jline.TerminalSupport
jline.WindowsTerminal
jline.AnsiWindowsTerminal
- All Implemented Interfaces:
Terminal
ANSI-supported
WindowsTerminal
.- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class jline.WindowsTerminal
WindowsTerminal.ConsoleMode
-
Field Summary
FieldsFields inherited from class jline.WindowsTerminal
ANSI, DIRECT_CONSOLE
Fields inherited from class jline.TerminalSupport
DEFAULT_HEIGHT, DEFAULT_WIDTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
boolean
Defaults to true which was the behaviour before this method was added.boolean
Subclass to change behavior if needed.private static OutputStream
wrapOutputStream
(OutputStream stream) Returns an ansi output stream handler.Methods inherited from class jline.WindowsTerminal
disableInterruptCharacter, enableInterruptCharacter, getDirectConsole, getHeight, getOutputEncoding, getWidth, init, isSystemIn, restore, setDirectConsole, setEchoEnabled, wrapInIfNeeded
Methods inherited from class jline.TerminalSupport
isEchoEnabled, isSupported, reset, setAnsiSupported
-
Field Details
-
ansiSupported
private final boolean ansiSupported
-
-
Constructor Details
-
AnsiWindowsTerminal
- Throws:
Exception
-
-
Method Details
-
wrapOutIfNeeded
Description copied from class:TerminalSupport
Subclass to change behavior if needed.- Specified by:
wrapOutIfNeeded
in interfaceTerminal
- Overrides:
wrapOutIfNeeded
in classTerminalSupport
- Returns:
- the passed out
-
wrapOutputStream
Returns an ansi output stream handler. We return whatever was passed if we determine we cannot handle ansi based on Kernel32 calls.- Returns:
- an @{link AltWindowAnsiOutputStream} instance or the passed stream.
-
detectAnsiSupport
private static boolean detectAnsiSupport() -
isAnsiSupported
public boolean isAnsiSupported()- Specified by:
isAnsiSupported
in interfaceTerminal
- Overrides:
isAnsiSupported
in classTerminalSupport
-
hasWeirdWrap
public boolean hasWeirdWrap()Description copied from class:TerminalSupport
Defaults to true which was the behaviour before this method was added.- Specified by:
hasWeirdWrap
in interfaceTerminal
- Overrides:
hasWeirdWrap
in classTerminalSupport
-