com.sshtools.daemon.terminal
Class Editline
java.lang.Object
com.sshtools.daemon.terminal.Editline
public class Editline
- extends java.lang.Object
- Version:
- $Revision: 1.1 $
- Author:
- $author$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buf
private Editline.Buffer buf
myIO
private TerminalIO myIO
Cursor
private int Cursor
InsertMode
private boolean InsertMode
lastSize
private int lastSize
hardwrapped
private boolean hardwrapped
lastread
private char lastread
lastcurspos
private int lastcurspos
maskInput
private boolean maskInput
mask
private char mask
Editline
public Editline(TerminalIO io)
- Creates a new Editline object.
- Parameters:
io
-
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
setCharAt
private void setCharAt(int pos,
char ch)
throws java.lang.IndexOutOfBoundsException,
java.io.IOException
- Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException
insertCharAt
private void insertCharAt(int pos,
char ch)
throws BufferOverflowException,
java.lang.IndexOutOfBoundsException,
java.io.IOException
- Throws:
BufferOverflowException
java.lang.IndexOutOfBoundsException
java.io.IOException
removeCharAt
private void removeCharAt(int pos)
throws java.lang.IndexOutOfBoundsException,
java.io.IOException
- Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException
insertStringAt
private void insertStringAt(int pos,
java.lang.String str)
throws BufferOverflowException,
java.lang.IndexOutOfBoundsException,
java.io.IOException
- Throws:
BufferOverflowException
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)
getLastRead
private char getLastRead()
setLastRead
private void setLastRead(char ch)
isInInsertMode
public boolean isInInsertMode()
setInsertMode
public void setInsertMode(boolean b)
isHardwrapped
public boolean isHardwrapped()
setHardwrapped
public void setHardwrapped(boolean b)
run
public int run()
draw
public void draw()
throws java.io.IOException
- Throws:
java.io.IOException
moveRight
private boolean moveRight()
throws java.io.IOException
- Throws:
java.io.IOException
moveLeft
private boolean moveLeft()
throws java.io.IOException
- Throws:
java.io.IOException
isCursorAtEnd
private boolean isCursorAtEnd()
handleCharInput
private void handleCharInput(int ch)
throws BufferOverflowException,
java.io.IOException
- Throws:
BufferOverflowException
java.io.IOException
storeSize
private void storeSize()