org.odftoolkit.simple.form
public abstract class AbstractFormContainer extends Object implements FormContainer
Constructor and Description |
---|
AbstractFormContainer() |
Modifier and Type | Method and Description |
---|---|
Form |
createForm(String name)
create and add a form into this container.
|
boolean |
getApplyDesignMode()
Get the attribute
form:apply-design-mode which specifies
whether forms are presented in editable or non-editable state. |
boolean |
getAutomaticFocus()
Get the attribute
form:automatic-focus which specifies
whether the consumer loading the document should set the focus to a form
control. |
Form |
getFormByName(String name)
Return a form whose name is a given value.
|
abstract OfficeFormsElement |
getFormContainerElement()
Get the ODF element
OfficeFormsElement which can have
FormFormElement as child element directly according to ODF
specification. |
Iterator<Form> |
getFormIterator()
Get an iterator to traverse each form in this container.
|
FormProvider |
getProvider()
Get the form provider of this container.
|
boolean |
removeForm(Form form)
Remove the form and its binding shape.
|
void |
setApplyDesignMode(boolean isDesignMode)
Set the attribute
form:apply-design-mode which specifies
whether forms are presented in editable or non-editable state. |
void |
setAutomaticFocus(boolean isAutoFocus)
Set the attribute
form:automatic-focus which specifies
whether the consumer loading the document should set the focus to a form
control. |
void |
setProvider(FormProvider provider)
Set the form provider of this container.
|
public abstract OfficeFormsElement getFormContainerElement()
FormContainer
OfficeFormsElement
which can have
FormFormElement
as child element directly according to ODF
specification. This element will help to find the position to insert a
new FormFormElement
element.getFormContainerElement
in interface FormContainer
public Form createForm(String name)
FormContainer
createForm
in interface FormContainer
name
- - form name, represents attribute form:name
public boolean removeForm(Form form)
FormContainer
removeForm
in interface FormContainer
form
- - the form to be removedpublic Form getFormByName(String name)
FormContainer
getFormByName
in interface FormContainer
name
- - the name of the formpublic Iterator<Form> getFormIterator()
FormContainer
getFormIterator
in interface FormContainer
public boolean getApplyDesignMode()
FormContainer
form:apply-design-mode
which specifies
whether forms are presented in editable or non-editable state.getApplyDesignMode
in interface FormContainer
public boolean getAutomaticFocus()
FormContainer
form:automatic-focus
which specifies
whether the consumer loading the document should set the focus to a form
control.getAutomaticFocus
in interface FormContainer
public void setApplyDesignMode(boolean isDesignMode)
FormContainer
form:apply-design-mode
which specifies
whether forms are presented in editable or non-editable state.setApplyDesignMode
in interface FormContainer
isDesignMode
- - true if forms in document are presented in editable state;
false if forms in document are presented in completed statepublic void setAutomaticFocus(boolean isAutoFocus)
FormContainer
form:automatic-focus
which specifies
whether the consumer loading the document should set the focus to a form
control.setAutomaticFocus
in interface FormContainer
isAutoFocus
- -true if sets the focus to a form control after loading the
document; false if else.public void setProvider(FormProvider provider)
provider
- - which is used to instantiate a formpublic FormProvider getProvider()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.