FIM.Util.WWW.Form
Class ElementGroup
java.lang.Object
|
+--FIM.Util.WWW.Form.FormElement
|
+--FIM.Util.WWW.Form.ElementGroup
- All Implemented Interfaces:
- Element, Serializable
- Direct Known Subclasses:
- SingleSelectionGroup
- public class ElementGroup
- extends FormElement
A group of selectable elements.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
- See Also:
- Serialized Form
Methods inherited from class FIM.Util.WWW.Form.FormElement |
getAttributes, getDocument, getElement, getElementCount, getElementIndex, getEndOffset, getLabel, getName, getParentElement, getStartOffset, match, setLabel |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
containedElems
protected Vector containedElems
- The contained elements.
ElementGroup
public ElementGroup(HTMLDocument doc,
Element parent,
String name)
- Create a new and empty selection group.
- Parameters:
doc
- the document this element belongs toparent
- the parent of this elementname
- the name of the group
getContainedElementCount
public int getContainedElementCount()
- Gets the number of contained elements.
- Returns:
- the number of child elements >= 0
getContainedElement
public Element getContainedElement(int index)
- Fetches the contained element at the given index.
- Parameters:
index
- the specified index >= 0- Returns:
- the child element
addContainedElement
public void addContainedElement(SelectableElement elem)
- Adds an element to the group at the end.
- Parameters:
elem
- the element to add
isLeaf
public boolean isLeaf()
- Is this element a leaf element (
true
if no elements contained at the moment)?
- Overrides:
isLeaf
in class FormElement
- Returns:
- true if a leaf element else false
reset
public void reset()
- Resets all contained elements to their initial state.
- Overrides:
reset
in class FormElement
getEncoded
public String getEncoded()
- Retrieve this group in encoded form. Contains all (and only) selected elements belonging to
this group in the form =. If no elements are selected, an empty string is returned
- Overrides:
getEncoded
in class FormElement
- Returns:
- the selected elements of the group in encoded form
selectedCount
public int selectedCount()
- Retrieve the number of elements in this group that are selected.
- Returns:
- number of selected elements
toString
public String toString()
- Returns a string representation of the element group.
- Overrides:
toString
in class FormElement
- Returns:
- string representation of the form element
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.