FIM.Util.WWW.Form
Class InputTextElement
java.lang.Object
|
+--FIM.Util.WWW.Form.FormElement
|
+--FIM.Util.WWW.Form.TextElement
|
+--FIM.Util.WWW.Form.InputTextElement
- All Implemented Interfaces:
- Element, Serializable
- Direct Known Subclasses:
- InputPasswordElement
- public class InputTextElement
- extends TextElement
Class for the HTML element INPUT with subtype TEXT. It contains a single line of text with an optional maximum length.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
- Serialized Form
Method Summary |
int |
getMaxLen()
Retrieve the current maximum length. |
void |
setMaxLen(int maxLen)
Set the maximum length for the text. |
void |
setText(String newText)
Set the text to a new value. |
Methods inherited from class FIM.Util.WWW.Form.FormElement |
getAttributes, getDocument, getElement, getElementCount, getElementIndex, getEndOffset, getLabel, getName, getParentElement, getStartOffset, isLeaf, setLabel |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InputTextElement
public InputTextElement(HTMLDocument doc,
Element parent,
int startOffs,
int endOffs,
String name,
String initialText)
- Creates a new INPUT/TEXT element.
- Parameters:
doc
- the document this element belongs toparent
- the parent of this elementstartOffs
- start offset of the element in the documentendOffs
- end offset of the element in the documentname
- the name of the elementinitialText
- the initial text content of the element
setText
public void setText(String newText)
- Set the text to a new value. If this text is longer than the length limit, it will be shortened.
- Overrides:
setText
in class TextElement
- Parameters:
newText
- the new text to store
setMaxLen
public void setMaxLen(int maxLen)
- Set the maximum length for the text. Negative values mean no limitation.
If the current text is longer than the limit, it will be shortened.
- Parameters:
maxLen
- the new maximum length for the text
getMaxLen
public int getMaxLen()
- Retrieve the current maximum length. -1 signals no limit.
- Returns:
- the current maximum length for the text
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.