TelnetD at SF

net.wimpi.telnetd.io.toolkit
Class Editfield

java.lang.Object
  extended bynet.wimpi.telnetd.io.toolkit.Component
      extended bynet.wimpi.telnetd.io.toolkit.ActiveComponent
          extended bynet.wimpi.telnetd.io.toolkit.Editfield

public class Editfield
extends ActiveComponent

Class that implements an Editfield. * * @author Dieter Wimberger * @version 2.0 (13/03/2005)


Field Summary
 
Fields inherited from class net.wimpi.telnetd.io.toolkit.Component
m_Dim, m_IO, m_Name, m_Position
 
Constructor Summary
Editfield(BasicTerminalIO io, java.lang.String name, int length)
          Constructs an Editfield.
 
Method Summary
 void append(char ch)
           
 void append(java.lang.String str)
           
 void clear()
           
 void draw()
          Method that draws the component.
 char getCharAt(int pos)
           
 int getCursorPosition()
           
 int getLength()
          Accessor method for field length
 int getSize()
          Accessor method for field buffer size
 java.lang.String getValue()
           
 void insertCharAt(int pos, char ch)
           
 void insertStringAt(int pos, java.lang.String str)
           
 boolean isInInsertMode()
           
 boolean isJustBackspace()
           
 boolean isPasswordField()
           
 void registerInputFilter(InputFilter filter)
           
 void registerInputValidator(InputValidator validator)
           
 void removeCharAt(int pos)
           
 void run()
          Method that will be * reading and processing input.
 void setCharAt(int pos, char ch)
           
 void setInsertMode(boolean b)
           
 void setJustBackspace(boolean b)
           
 void setPasswordField(boolean b)
           
 void setValue(java.lang.String str)
           
 
Methods inherited from class net.wimpi.telnetd.io.toolkit.Component
getDimension, getLocation, getName, setDimension, setLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Editfield

public Editfield(BasicTerminalIO io,
                 java.lang.String name,
                 int length)
Constructs an Editfield.

Method Detail

getLength

public int getLength()
Accessor method for field length. * * @return int that represents length of editfield.


getSize

public int getSize()
Accessor method for field buffer size. * * @return int that represents the number of chars in the fields buffer.


getValue

public java.lang.String getValue()

setValue

public void setValue(java.lang.String str)
              throws BufferOverflowException,
                     java.io.IOException
Throws:
BufferOverflowException
java.io.IOException

clear

public void clear()
           throws java.io.IOException
Throws:
java.io.IOException

getCharAt

public char getCharAt(int pos)
               throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

setCharAt

public void setCharAt(int pos,
                      char ch)
               throws java.lang.IndexOutOfBoundsException,
                      java.io.IOException
Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException

insertCharAt

public void insertCharAt(int pos,
                         char ch)
                  throws BufferOverflowException,
                         java.lang.IndexOutOfBoundsException,
                         java.io.IOException
Throws:
BufferOverflowException
java.lang.IndexOutOfBoundsException
java.io.IOException

removeCharAt

public void removeCharAt(int pos)
                  throws java.lang.IndexOutOfBoundsException,
                         java.io.IOException
Throws:
java.lang.IndexOutOfBoundsException
java.io.IOException

insertStringAt

public 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()

isJustBackspace

public boolean isJustBackspace()

setJustBackspace

public void setJustBackspace(boolean b)

registerInputFilter

public void registerInputFilter(InputFilter filter)
Parameters:
filter - Object instance that implements the InputFilter interface.

registerInputValidator

public void registerInputValidator(InputValidator validator)
Parameters:
validator - Object instance that implements the InputValidator interface.

isInInsertMode

public boolean isInInsertMode()

setInsertMode

public void setInsertMode(boolean b)

isPasswordField

public boolean isPasswordField()

setPasswordField

public void setPasswordField(boolean b)

run

public void run()
         throws java.io.IOException
Method that will be * reading and processing input.

Specified by:
run in class ActiveComponent
Throws:
java.io.IOException

draw

public void draw()
          throws java.io.IOException
Description copied from class: Component
Method that draws the component.

Specified by:
draw in class Component
Throws:
java.io.IOException

TelnetD at SF

Copyright © 2000-2005 Dieter Wimberger.