Agent System POND 1.2 (28.2.2002)

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

Fields inherited from class FIM.Util.WWW.Form.TextElement
currentText
 
Fields inherited from class FIM.Util.WWW.Form.FormElement
attributes, children
 
Constructor Summary
InputTextElement(HTMLDocument doc, Element parent, int startOffs, int endOffs, String name, String initialText)
          Creates a new INPUT/TEXT element.
 
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.TextElement
getEncoded, getText, match, reset, toString
 
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
 

Constructor Detail

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 to
parent - the parent of this element
startOffs - start offset of the element in the document
endOffs - end offset of the element in the document
name - the name of the element
initialText - the initial text content of the element
Method Detail

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

Agent System POND 1.2 (28.2.2002)

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.