Package com.sshtools.daemon.terminal
Class UserInput
- java.lang.Object
-
- com.sshtools.daemon.terminal.UserInput
-
- All Implemented Interfaces:
java.lang.Runnable
public class UserInput extends java.lang.Object implements java.lang.Runnable
- Version:
- $Revision: 1.12 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description UserInput(TerminalIO io, java.io.OutputStream pout)
Creates a new UserInput object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(char ch)
void
append(java.lang.String str)
void
clear()
void
draw()
int
getCursorPosition()
java.lang.String
getHardwrap()
java.lang.String
getSoftwrap()
java.lang.String
getValue()
boolean
isHardwrapped()
boolean
isInInsertMode()
void
maskInput(boolean maskInput)
void
run()
void
setCursorPosition(int pos)
void
setHardwrapped(boolean b)
void
setInsertMode(boolean b)
void
setMask(char mask)
void
setValue(java.lang.String str)
int
size()
-
-
-
Constructor Detail
-
UserInput
public UserInput(TerminalIO io, java.io.OutputStream pout)
Creates a new UserInput object.- Parameters:
io
-pout
-
-
-
Method Detail
-
size
public int size()
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String str) throws BufferOverflowException, java.io.IOException
- Throws:
BufferOverflowException
java.io.IOException
-
maskInput
public void maskInput(boolean maskInput)
-
setMask
public void setMask(char mask)
- Parameters:
mask
-
-
clear
public void clear() throws java.io.IOException
- Throws:
java.io.IOException
-
getSoftwrap
public java.lang.String getSoftwrap() throws java.lang.IndexOutOfBoundsException, java.io.IOException
- Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException
-
getHardwrap
public java.lang.String getHardwrap() throws java.lang.IndexOutOfBoundsException, java.io.IOException
- Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException
-
append
public void append(char ch) throws BufferOverflowException, java.io.IOException
- Throws:
BufferOverflowException
java.io.IOException
-
append
public void append(java.lang.String str) throws BufferOverflowException, java.io.IOException
- Throws:
BufferOverflowException
java.io.IOException
-
getCursorPosition
public int getCursorPosition()
-
setCursorPosition
public void setCursorPosition(int pos)
-
isInInsertMode
public boolean isInInsertMode()
-
setInsertMode
public void setInsertMode(boolean b)
-
isHardwrapped
public boolean isHardwrapped()
-
setHardwrapped
public void setHardwrapped(boolean b)
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
draw
public void draw() throws java.io.IOException
- Throws:
java.io.IOException
-
-