All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.html.TextInput
java.lang.Object
|
+----sdsu.html.TextInput
- public class TextInput
- extends Object
- implements HTML
There are three types of Text inputs: scrolling (TEXTAREA tag),
single-line (INPUT tag) and password (INPUT tag).
Examples of each:
All must be used in a form. Text in input area is reported as:
TextInputName=TextInInputArea. Where TextInputName is the name given
to the TextInput object, and TextInInputArea is
the text in the input area when the form
is sent.
Use static methods TextInput.scrolling( ),
TextInput.singleLine(...), TextInput.password(...) to create
instance of this class.
- Version:
- 0.8 6 April 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
-
password(String, int)
- Create a text input area for entering passwords.
-
scrolling(String, int, int)
- Create a scrolling text input area.
-
setInitalText(String)
- Sets the inital text seen in the text input.
-
singleLine(String, int)
- Create a single-line text input area.
-
singleLine(String, int, int)
- Create a single-line text input area.
-
toString()
-
scrolling
public static TextInput scrolling(String name,
int numberOfRows,
int numberOfColumns)
- Create a scrolling text input area.
- Parameters:
- name - name used to report the contents of text area to a cgi program.
The value reported will be the text in the text input.
- numberOfRows - number of rows of text displayable in the text area,
should be at least three, so the scrollbars look reasonable.
- numberOfColumns - the width of the text input in number of characters.
singleLine
public static TextInput singleLine(String name,
int numberOfColumns)
- Create a single-line text input area.
- Parameters:
- name - name used to report the contents of text area to a cgi program.
The value reported will be the text in the text input.
- numberOfColumns - the width of the text input in number of characters.
singleLine
public static TextInput singleLine(String name,
int numberOfColumns,
int maxTextLength)
- Create a single-line text input area.
- Parameters:
- name - name used to report the contents of text area to a cgi program.
The value reported will be the text in the text input.
- numberOfColumns - the width of the text input in number of characters.
- maxTextLength - maximum number of characters a user is allowed to enter.
password
public static TextInput password(String name,
int numberOfColumns)
- Create a text input area for entering passwords. Input is echoed
as * or some other single character.
- Parameters:
- name - name used to report the contents of text area to a cgi program.
The value reported will be the text in the text input.
- numberOfColumns - the width of the text input in number of characters.
setInitalText
public void setInitalText(String text)
- Sets the inital text seen in the text input. Must be plain text.
No html marked text allowed. Special characters in text are escaped for you.
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index