Class Form
java.lang.Object
com.independentsoft.office.odf.forms.Form
- All Implemented Interfaces:
IFormContent,IOfficeFormsContent,IContentElement
Represents a user interface form and defines the contents and properties of the form.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the action.Gets the command to execute on a data source.Gets the type of command to execute on a data source.Gets the source database.Contains a collection of IFormContent objects.Returns all content elements.Gets the specific concrete rendition or implementation of a control that should be instantiated.Gets the name of a data source to use for a form.Gets the names of the columns in contained forms that are related to columns in the containing form.Gets the content type used to submit the form to the server.Contains a collection of EventListener objects.Gets the filter.Gets the names of the columns in the result set represented by a parent form.Gets the HTTP method used to submit data in a form to a server.getName()Gets the name of a form or control element.Gets methods for navigation of a database aware form.getOrder()Gets a sort criteria for a command.Returns the parent content element.Contains a collection of FormProperty objects.Specifies how the consumer responds when the user presses the TAB key in the controls in a form.Gets the target frame.booleanSpecifies whether data records can be deleted by a form.booleanSpecifies whether new data records can be inserted by a form.booleanSpecifies whether data records in the form can be updated.booleanSpecifies whether the filter clause is applied to the SQL command constituting the form's result set.booleanSpecifies whether the consumer processes the command before passing it to a database driver.booleanSpecifies whether to discard all results that are retrieved from an underlying data source.voidSets the action.voidsetAllowDeletes(boolean allowDeletes)Specifies whether data records can be deleted by a form.voidsetAllowInserts(boolean allowInserts)Specifies whether new data records can be inserted by a form.voidsetAllowUpdates(boolean allowUpdates)Specifies whether data records in the form can be updated.voidsetApplyFilter(boolean applyFilter)Specifies whether the filter clause is applied to the SQL command constituting the form's result set.voidsetCommand(String command)Sets the command to execute on a data source.voidsetCommandType(CommandType commandType)Sets the type of command to execute on a data source.voidsetConnectionResource(String connectionResource)Sets the source database.voidsetControlImplementation(String controlImplementation)Sets the specific concrete rendition or implementation of a control that should be instantiated.voidsetDataSource(String dataSource)Sets the name of a data source to use for a form.voidsetDetailFields(String detailFields)Sets the names of the columns in contained forms that are related to columns in the containing form.voidsetEncodingType(String encodingType)Sets the content type used to submit the form to the server.voidsetEscapeProcessing(boolean escapeProcessing)Specifies whether the consumer processes the command before passing it to a database driver.voidSets the filter.voidsetIgnoreResult(boolean ignoreResult)Specifies whether to discard all results that are retrieved from an underlying data source.voidsetMasterFields(String masterFields)Sets the names of the columns in the result set represented by a parent form.voidSets the HTTP method used to submit data in a form to a server.voidSets the name of a form or control element.voidsetNavigationMode(NavigationMode navigationMode)Sets methods for navigation of a database aware form.voidSets a sort criteria for a command.voidsetParent(IContentElement parent)Sets the parent content element.voidsetTabCycle(TabCycle tabCycle)Specifies how the consumer responds when the user presses the TAB key in the controls in a form.voidsetTargetFrame(String targetFrame)Sets the target frame.toString()Converts the value of the current Form object to its equivalent string representation.
-
Constructor Details
-
Form
public Form()Initializes a new instance of the Form class.
-
-
Method Details
-
getContentElements
Returns all content elements.- Specified by:
getContentElementsin interfaceIContentElement- Returns:
- A collection of content elements.
-
getParent
Returns the parent content element.- Specified by:
getParentin interfaceIContentElement- Returns:
- the parent
-
setParent
Sets the parent content element.- Specified by:
setParentin interfaceIContentElement- Parameters:
parent- the new parent
-
clone
Creates a new object that is a deep copy of the current instance.- Specified by:
clonein interfaceIContentElement- Specified by:
clonein interfaceIFormContent- Specified by:
clonein interfaceIOfficeFormsContent- Overrides:
clonein classObject- Returns:
- A new object that is a copy of this instance.
-
toString
Converts the value of the current Form object to its equivalent string representation. -
getContent
Contains a collection of IFormContent objects.- Returns:
- the content
-
getProperties
Contains a collection of FormProperty objects.- Returns:
- the properties
-
getEventListeners
Contains a collection of EventListener objects.- Returns:
- the event listeners
-
getName
Gets the name of a form or control element.- Returns:
- the name
-
setName
Sets the name of a form or control element.- Parameters:
name- the new name
-
getControlImplementation
Gets the specific concrete rendition or implementation of a control that should be instantiated.- Returns:
- the control implementation
-
setControlImplementation
Sets the specific concrete rendition or implementation of a control that should be instantiated.- Parameters:
controlImplementation- the new control implementation
-
getAction
Gets the action.- Returns:
- the action
-
setAction
Sets the action.- Parameters:
controlImplementation- the new action
-
getTargetFrame
Gets the target frame. The defined values are: - _blank: The referenced document is displayed in a new frame. - _parent: The referenced document is displayed in the parent frame of the current frame. - _self: The referenced document replaces the content of the current frame. - _top: The referenced document is displayed in the topmost frame, that is the frame that contains the current frame as a child or descendant but is not contained within another frame. - A frame name : The referenced document is displayed in the named frame. If the named frame does not exist, a new frame with that name is created.- Returns:
- the target frame
-
setTargetFrame
Sets the target frame. The defined values are: - _blank: The referenced document is displayed in a new frame. - _parent: The referenced document is displayed in the parent frame of the current frame. - _self: The referenced document replaces the content of the current frame. - _top: The referenced document is displayed in the topmost frame, that is the frame that contains the current frame as a child or descendant but is not contained within another frame. - A frame name : The referenced document is displayed in the named frame. If the named frame does not exist, a new frame with that name is created.- Parameters:
targetFrame- the new target frame
-
getMethod
Gets the HTTP method used to submit data in a form to a server. The defined values are: -get: HTTP get method. -post: HTTP post method. -a value of type String- Returns:
- the method
-
setMethod
Sets the HTTP method used to submit data in a form to a server. The defined values are: -get: HTTP get method. -post: HTTP post method. -a value of type String- Parameters:
method- the new method
-
getEncodingType
Gets the content type used to submit the form to the server.- Returns:
- the encoding type
-
setEncodingType
Sets the content type used to submit the form to the server.- Parameters:
encodingType- the new encoding type
-
isAllowDeletes
public boolean isAllowDeletes()Specifies whether data records can be deleted by a form. It applies only if a form is data-aware.- Returns:
- true, if is allow deletes
-
setAllowDeletes
public void setAllowDeletes(boolean allowDeletes)Specifies whether data records can be deleted by a form. It applies only if a form is data-aware.- Parameters:
allowDeletes- the new allow deletes
-
isAllowInserts
public boolean isAllowInserts()Specifies whether new data records can be inserted by a form. It applies only if the form is data-aware.- Returns:
- true, if is allow inserts
-
setAllowInserts
public void setAllowInserts(boolean allowInserts)Specifies whether new data records can be inserted by a form. It applies only if the form is data-aware.- Parameters:
allowInserts- the new allow inserts
-
isAllowUpdates
public boolean isAllowUpdates()Specifies whether data records in the form can be updated. It applies only if the form is data-aware.- Returns:
- true, if is allow updates
-
setAllowUpdates
public void setAllowUpdates(boolean allowUpdates)Specifies whether data records in the form can be updated. It applies only if the form is data-aware.- Parameters:
allowUpdates- the new allow updates
-
isApplyFilter
public boolean isApplyFilter()Specifies whether the filter clause is applied to the SQL command constituting the form's result set.- Returns:
- true, if is apply filter
-
setApplyFilter
public void setApplyFilter(boolean applyFilter)Specifies whether the filter clause is applied to the SQL command constituting the form's result set.- Parameters:
applyFilter- the new apply filter
-
getCommandType
Gets the type of command to execute on a data source. The defined values of the form:command-type attribute are: -command: the command contains an SQL statement. The form executes the SQL statement. -query: the command contains the name of query. The form retrieves and executes the query. -table: the command contains a table name. The form retrieves all of the data in the table.- Returns:
- the command type
-
setCommandType
Sets the type of command to execute on a data source. The defined values of the form:command-type attribute are: -command: the command contains an SQL statement. The form executes the SQL statement. -query: the command contains the name of query. The form retrieves and executes the query. -table: the command contains a table name. The form retrieves all of the data in the table.- Parameters:
commandType- the new command type
-
getCommand
Gets the command to execute on a data source.- Returns:
- the command
-
setCommand
Sets the command to execute on a data source.- Parameters:
command- the new command
-
getDataSource
Gets the name of a data source to use for a form. The defined values are: - A URI specifying a database connection. - A data source name that an consumer can use to establish database connections. - The URL of an OpenDocument database front-end document.- Returns:
- the data source
-
setDataSource
Sets the name of a data source to use for a form. The defined values are: - A URI specifying a database connection. - A data source name that an consumer can use to establish database connections. - The URL of an OpenDocument database front-end document.- Parameters:
dataSource- the new data source
-
getMasterFields
Gets the names of the columns in the result set represented by a parent form.- Returns:
- the master fields
-
setMasterFields
Sets the names of the columns in the result set represented by a parent form.- Parameters:
masterFields- the new master fields
-
getDetailFields
Gets the names of the columns in contained forms that are related to columns in the containing form.- Returns:
- the detail fields
-
setDetailFields
Sets the names of the columns in contained forms that are related to columns in the containing form.- Parameters:
detailFields- the new detail fields
-
isEscapeProcessing
public boolean isEscapeProcessing()Specifies whether the consumer processes the command before passing it to a database driver.- Returns:
- true, if is escape processing
-
setEscapeProcessing
public void setEscapeProcessing(boolean escapeProcessing)Specifies whether the consumer processes the command before passing it to a database driver.- Parameters:
escapeProcessing- the new escape processing
-
getFilter
Gets the filter.- Returns:
- the filter
-
setFilter
Sets the filter.- Parameters:
filter- the new filter
-
isIgnoreResult
public boolean isIgnoreResult()Specifies whether to discard all results that are retrieved from an underlying data source.- Returns:
- true, if is ignore result
-
setIgnoreResult
public void setIgnoreResult(boolean ignoreResult)Specifies whether to discard all results that are retrieved from an underlying data source.- Parameters:
ignoreResult- the new ignore result
-
getOrder
Gets a sort criteria for a command.- Returns:
- the order
-
setOrder
Sets a sort criteria for a command.- Parameters:
order- the new order
-
getTabCycle
Specifies how the consumer responds when the user presses the TAB key in the controls in a form. The behavior of the consumer depends on whether the form is bound to a data source.- Returns:
- the tab cycle
-
setTabCycle
Specifies how the consumer responds when the user presses the TAB key in the controls in a form. The behavior of the consumer depends on whether the form is bound to a data source.- Parameters:
tabCycle- the new tab cycle
-
getConnectionResource
Gets the source database.- Returns:
- the connection resource
-
setConnectionResource
Sets the source database.- Parameters:
connectionResource- the new connection resource
-