public abstract class TerminalSupport extends Object implements Terminal
Terminal
instances.Modifier and Type | Class and Description |
---|---|
protected class |
TerminalSupport.RestoreHook |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HEIGHT |
static String |
DEFAULT_KEYBINDINGS_PROPERTIES |
static int |
DEFAULT_WIDTH |
Modifier | Constructor and Description |
---|---|
protected |
TerminalSupport(boolean supported) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getDefaultBindings() |
int |
getHeight() |
int |
getWidth() |
void |
init() |
protected void |
installShutdownHook(Thread hook) |
boolean |
isAnsiSupported() |
boolean |
isEchoEnabled() |
boolean |
isSupported() |
int |
readCharacter(InputStream in) |
int |
readVirtualKey(InputStream in) |
protected void |
removeShutdownHook() |
void |
reset() |
void |
restore() |
protected void |
setAnsiSupported(boolean supported) |
void |
setEchoEnabled(boolean enabled) |
public static String DEFAULT_KEYBINDINGS_PROPERTIES
public static final int DEFAULT_WIDTH
public static final int DEFAULT_HEIGHT
public void restore() throws Exception
public void reset() throws Exception
protected void installShutdownHook(Thread hook)
protected void removeShutdownHook()
public final boolean isSupported()
isSupported
in interface Terminal
public boolean isAnsiSupported()
isAnsiSupported
in interface Terminal
protected void setAnsiSupported(boolean supported)
public boolean isEchoEnabled()
isEchoEnabled
in interface Terminal
public void setEchoEnabled(boolean enabled)
setEchoEnabled
in interface Terminal
public int readCharacter(InputStream in) throws IOException
readCharacter
in interface Terminal
IOException
public int readVirtualKey(InputStream in) throws IOException
readVirtualKey
in interface Terminal
IOException
public InputStream getDefaultBindings()
getDefaultBindings
in interface Terminal
Copyright © 2008-2012 Sonatype. All Rights Reserved.