|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object writer2latex.office.ControlReader
public class ControlReader
This class reads a form control in an OOo document (a form:control node). A control always has an owner form. Properties and events are ignored.
Constructor Summary | |
---|---|
ControlReader(org.w3c.dom.Element control,
FormReader ownerForm)
The constructor reads the content of a control element The representation in OpenDocument differs slightly from OOo 1.x. |
Method Summary | |
---|---|
java.lang.String |
getAttribute(java.lang.String sName)
Get an attribute of the control. |
java.lang.String |
getControlType()
The type of the control is identified by a name, eg. form:submit |
java.lang.String |
getId()
A control in OOo is identified by id ( form:control-id
attribute. |
java.lang.String |
getItemAttribute(int nIndex,
java.lang.String sName)
Get an attribute of an option/item. |
int |
getItemCount()
Return the number of options/items in this control. |
java.lang.String |
getItemValue(int nIndex)
Get the value of an option/item. |
FormReader |
getOwnerForm()
A control in OOo belongs to a form. |
java.lang.String |
getTypeAttribute(java.lang.String sName)
Get an attribute specific to this type of control. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ControlReader(org.w3c.dom.Element control, FormReader ownerForm)
The constructor reads the content of a control element
The representation in OpenDocument differs slightly from OOo 1.x.
control
- a DOM element, which must be control nodeMethod Detail |
---|
public java.lang.String getId()
A control in OOo is identified by id (form:control-id
attribute. The id is accessed by this method.
public FormReader getOwnerForm()
A control in OOo belongs to a form.
public java.lang.String getAttribute(java.lang.String sName)
Get an attribute of the control. If the attribute does not exist,
this method returns null
.
sName
- the name of the attribute
null
public java.lang.String getControlType()
The type of the control is identified by a name, eg. form:submit
public java.lang.String getTypeAttribute(java.lang.String sName)
Get an attribute specific to this type of control.
If the attribute does not exist, this method returns null
.
sName
- the name of the attribute
null
public int getItemCount()
Return the number of options/items in this control. Only listbox (options) and combobox (items) controls can have these, for other controls this will return 0.
public java.lang.String getItemAttribute(int nIndex, java.lang.String sName)
Get an attribute of an option/item.
If the index and/or the attribute does not exist, this method returns
null
.
nIndex
- the index of the option/itemsName
- the name of the attribute
null
public java.lang.String getItemValue(int nIndex)
Get the value of an option/item.
If the index does not exist, this method returns
null
.
nIndex
- the index of the option/item
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |