Modifier and Type | Field and Description |
---|---|
protected OfficeFormsElement |
mFormContainerElement |
Modifier and Type | Method and Description |
---|---|
Button |
createButton(ControlContainer parent,
FrameRectangle rectangle,
String name,
String label)
Create a button control in this form.
|
FormControl |
createCheckBox(ControlContainer parent,
FrameRectangle rectangle,
String name,
String label,
String value)
Create a check box in this form.
|
FormControl |
createComboBox(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultText,
boolean isDropDown)
Create a combo box in this form.
|
FormControl |
createCurrencyField(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultValue)
Create a currency field in this form.
|
FormControl |
createDateField(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultValue)
Create a time field in this form.
|
FormControl |
createLabel(ControlContainer parent,
FrameRectangle rectangle,
String name,
String text)
Create a label control in this form.
|
FormControl |
createListBox(ControlContainer parent,
FrameRectangle rectangle,
String name,
boolean isMultiSelection,
boolean isDropDown)
Create a list box in this form.
|
FormControl |
createNumericField(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultValue)
Create a numeric field in this form.
|
FormControl |
createPatternField(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultValue)
Create a pattern field in this form.
|
FormControl |
createRadioButton(ControlContainer parent,
FrameRectangle rectangle,
String name,
String label,
String value)
Create a radio button in this form.
|
FormControl |
createTextBox(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultText,
boolean isMultipleLine)
Create a textbox in this form.
|
FormControl |
createTimeField(ControlContainer parent,
FrameRectangle rectangle,
String name,
String defaultValue)
Create a time field in this form.
|
String |
getCommand()
Get the command to execute on a data source
|
FormTypeDefinition.FormCommandType |
getCommandType()
Get the type of command to execute on a data source
|
String |
getControlImplementation()
Get the implementation of the created control
|
String |
getDataSource()
Get the name of data source
|
String |
getFormName()
Get the form name
|
static Form |
getInstance(FormFormElement element)
Get a form instance by an instance of
FormFormElement . |
FormFormElement |
getOdfElement()
Return the instance of OdfElement which presents this structure.
|
Document |
getOwnerDocument()
Get the owner document of this component
|
void |
setCommand(String command)
Set a command to execute on a data source
|
void |
setCommandType(FormTypeDefinition.FormCommandType commandType)
Set the type of command to execute on a data source.
|
void |
setControlImplementation(String controlImpl)
Set the implementation of the created control
|
void |
setDataSource(String dataSource)
Set the data source to be used by the form
|
void |
setFormName(String name)
Set the name of this form
|
getComponentByElement, registerComponent, unregisterComponent
protected OfficeFormsElement mFormContainerElement
public Document getOwnerDocument()
Component
getOwnerDocument
in class Component
public static Form getInstance(FormFormElement element)
FormFormElement
.element
- public Button createButton(ControlContainer parent, FrameRectangle rectangle, String name, String label)
Form
createButton
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controllabel
- - the text label of the buttonpublic FormControl createLabel(ControlContainer parent, FrameRectangle rectangle, String name, String text)
Form
createLabel
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controltext
- -default text of the labelpublic FormControl createTextBox(ControlContainer parent, FrameRectangle rectangle, String name, String defaultText, boolean isMultipleLine)
Form
createTextBox
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultText
- -default text of the textboxisMultipleLine
- - if this textbox supports multiple lines inputpublic FormControl createListBox(ControlContainer parent, FrameRectangle rectangle, String name, boolean isMultiSelection, boolean isDropDown)
Form
createListBox
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controlisMultiSelection
- - support multi-selection or notisDropDown
- - the drop-down list is visible or notpublic FormControl createComboBox(ControlContainer parent, FrameRectangle rectangle, String name, String defaultText, boolean isDropDown)
Form
createComboBox
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultText
- - the default text of comboboxisDropDown
- - the drop-down list is visible or notpublic FormControl createRadioButton(ControlContainer parent, FrameRectangle rectangle, String name, String label, String value)
Form
createRadioButton
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controllabel
- - the label of this radio buttonvalue
- - the value assign to this optionpublic FormControl createCheckBox(ControlContainer parent, FrameRectangle rectangle, String name, String label, String value)
Form
createCheckBox
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controllabel
- - the label of this check boxvalue
- - the value assign to this optionpublic FormControl createDateField(ControlContainer parent, FrameRectangle rectangle, String name, String defaultValue)
createDateField
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultValue
- - the default value of this input field. It's a 6 digits
number, e.g. 20121015 represents 2012-10-15.public FormControl createTimeField(ControlContainer parent, FrameRectangle rectangle, String name, String defaultValue)
createTimeField
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultValue
- - the default value of this input field. It's a 6 digits
number, e.g. 15304000 represents 15:30:40.public FormControl createNumericField(ControlContainer parent, FrameRectangle rectangle, String name, String defaultValue)
Form
createNumericField
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultValue
- - the default value of this input fieldpublic FormControl createPatternField(ControlContainer parent, FrameRectangle rectangle, String name, String defaultValue)
Form
createPatternField
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultValue
- - the default value of this input fieldpublic FormControl createCurrencyField(ControlContainer parent, FrameRectangle rectangle, String name, String defaultValue)
Form
createCurrencyField
in interface Form
parent
- - the element that contains this form controlrectangle
- - the bounding rectangle used by this buttonname
- - the name of the controldefaultValue
- - the default value of this input fieldpublic void setControlImplementation(String controlImpl)
Form
setControlImplementation
in interface Form
controlImpl
- - implementation of controlpublic void setFormName(String name)
Form
setFormName
in interface Form
name
- - the form namepublic void setCommand(String command)
Form
setCommand
in interface Form
public void setCommandType(FormTypeDefinition.FormCommandType commandType)
Form
setCommandType
in interface Form
commandType
- the command typepublic void setDataSource(String dataSource)
Form
setDataSource
in interface Form
dataSource
- - name of data sourcepublic FormFormElement getOdfElement()
Component
getOdfElement
in interface Form
getOdfElement
in class Component
public String getFormName()
Form
getFormName
in interface Form
public String getCommand()
Form
getCommand
in interface Form
public FormTypeDefinition.FormCommandType getCommandType()
Form
getCommandType
in interface Form
public String getControlImplementation()
Form
getControlImplementation
in interface Form
public String getDataSource()
Form
getDataSource
in interface Form
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.