java.lang.Object
com.independentsoft.office.odf.forms.Form
All Implemented Interfaces:
IFormContent, IOfficeFormsContent, IContentElement

public class Form extends Object implements IOfficeFormsContent, IFormContent
Represents a user interface form and defines the contents and properties of the form.
  • Constructor Details

    • Form

      public Form()
      Initializes a new instance of the Form class.
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Parameters:
      parent - the new parent
    • clone

      public Form clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IFormContent
      Specified by:
      clone in interface IOfficeFormsContent
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Form object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getContent

      public List<IFormContent> getContent()
      Contains a collection of IFormContent objects.
      Returns:
      the content
    • getProperties

      public List<FormProperty> getProperties()
      Contains a collection of FormProperty objects.
      Returns:
      the properties
    • getEventListeners

      public List<IEventListener> getEventListeners()
      Contains a collection of EventListener objects.
      Returns:
      the event listeners
    • getName

      public String getName()
      Gets the name of a form or control element.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name of a form or control element.
      Parameters:
      name - the new name
    • getControlImplementation

      public String getControlImplementation()
      Gets the specific concrete rendition or implementation of a control that should be instantiated.
      Returns:
      the control implementation
    • setControlImplementation

      public void setControlImplementation(String controlImplementation)
      Sets the specific concrete rendition or implementation of a control that should be instantiated.
      Parameters:
      controlImplementation - the new control implementation
    • getAction

      public String getAction()
      Gets the action.
      Returns:
      the action
    • setAction

      public void setAction(String controlImplementation)
      Sets the action.
      Parameters:
      controlImplementation - the new action
    • getTargetFrame

      public String 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

      public void setTargetFrame(String targetFrame)
      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

      public String 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

      public void setMethod(String method)
      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

      public String getEncodingType()
      Gets the content type used to submit the form to the server.
      Returns:
      the encoding type
    • setEncodingType

      public void setEncodingType(String encodingType)
      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

      public CommandType 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

      public void setCommandType(CommandType commandType)
      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

      public String getCommand()
      Gets the command to execute on a data source.
      Returns:
      the command
    • setCommand

      public void setCommand(String command)
      Sets the command to execute on a data source.
      Parameters:
      command - the new command
    • getDataSource

      public String 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

      public void setDataSource(String dataSource)
      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

      public String getMasterFields()
      Gets the names of the columns in the result set represented by a parent form.
      Returns:
      the master fields
    • setMasterFields

      public void setMasterFields(String masterFields)
      Sets the names of the columns in the result set represented by a parent form.
      Parameters:
      masterFields - the new master fields
    • getDetailFields

      public String getDetailFields()
      Gets the names of the columns in contained forms that are related to columns in the containing form.
      Returns:
      the detail fields
    • setDetailFields

      public void setDetailFields(String detailFields)
      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

      public String getFilter()
      Gets the filter.
      Returns:
      the filter
    • setFilter

      public void setFilter(String filter)
      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
    • getNavigationMode

      public NavigationMode getNavigationMode()
      Gets methods for navigation of a database aware form.
      Returns:
      the navigation mode
    • setNavigationMode

      public void setNavigationMode(NavigationMode navigationMode)
      Sets methods for navigation of a database aware form.
      Parameters:
      navigationMode - the new navigation mode
    • getOrder

      public String getOrder()
      Gets a sort criteria for a command.
      Returns:
      the order
    • setOrder

      public void setOrder(String order)
      Sets a sort criteria for a command.
      Parameters:
      order - the new order
    • getTabCycle

      public TabCycle 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

      public void setTabCycle(TabCycle tabCycle)
      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

      public String getConnectionResource()
      Gets the source database.
      Returns:
      the connection resource
    • setConnectionResource

      public void setConnectionResource(String connectionResource)
      Sets the source database.
      Parameters:
      connectionResource - the new connection resource