|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwriter2latex.office.FormsReader
public class FormsReader
This class reads the collection of all forms in an OOo document
(the office:forms element).
An OOo document may contain any number of forms; these are declared
within this element. In OOo, unlike eg. html, the form declaration is
separated from the presentation. This element contains the
declaration. The presentation is given by inclusion of
draw:control elements in the document flow. These refer to form
controls by id.
Note: A form is identified by a unique name, a control is identified by a (globally) unique id.
| Field Summary | |
|---|---|
private java.util.Hashtable<java.lang.String,ControlReader> |
controls
|
private java.util.Hashtable<java.lang.String,FormReader> |
forms
|
private org.w3c.dom.Element |
formsElement
|
| Constructor Summary | |
|---|---|
FormsReader()
|
|
| Method Summary | |
|---|---|
protected void |
addControl(ControlReader control)
Add a control |
java.lang.String |
getAttribute(java.lang.String sName)
Get an attribute of the forms. |
ControlReader |
getControl(java.lang.String sId)
Get a control by id |
java.util.Iterator<ControlReader> |
getControlsIterator()
Get a Iterator over all controls. |
FormReader |
getForm(java.lang.String sName)
Get a form by name |
java.util.Iterator<FormReader> |
getFormsIterator()
Get a Iterator over all forms. |
void |
read(org.w3c.dom.Element formsElement)
Read the content of an office:forms element |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.w3c.dom.Element formsElement
private java.util.Hashtable<java.lang.String,FormReader> forms
private java.util.Hashtable<java.lang.String,ControlReader> controls
| Constructor Detail |
|---|
public FormsReader()
| Method Detail |
|---|
public void read(org.w3c.dom.Element formsElement)
Read the content of an office:forms element
formsElement - a DOM element, which must be office:forms nodepublic java.lang.String getAttribute(java.lang.String sName)
Get an attribute of the forms. If the attribute does not exist,
this method returns null.
sName - the name of the attribute
nullpublic java.util.Iterator<FormReader> getFormsIterator()
Get a Iterator over all forms.
Iterator over all formspublic FormReader getForm(java.lang.String sName)
Get a form by name
sName - the form:name of the form
FormReader objectpublic java.util.Iterator<ControlReader> getControlsIterator()
Get a Iterator over all controls.
Iterator over all controlspublic ControlReader getControl(java.lang.String sId)
Get a control by id
sId - the form:control-id of the control
ControlReader objectprotected void addControl(ControlReader control)
Add a control
control - a ControlReader representing the control
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||