Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.bion.officelayer.internal.form
Class FormService

java.lang.Object
  extended by ag.ion.bion.officelayer.internal.form.FormService
All Implemented Interfaces:
IFormService

public class FormService
extends java.lang.Object
implements IFormService

The implementation of the form service of a document.


Constructor Summary
FormService(IDocument document, com.sun.star.drawing.XDrawPage xDrawPage)
          Constructs new FormService.
 
Method Summary
 IFormComponent[] getFormComponents()
          Returns all form components contained in this component.
 java.lang.String[] getFormComponentsNames()
          Returns all form components names contained in this component.
 IForm[] getForms(java.lang.String formName)
          Returns the forms for the given form name as an array.
 int getIndexInForm(IForm form, IFormComponent formComponent)
          Returns the index of the given form component in the given form, or -1 if not found.
 com.sun.star.script.XEventAttacherManager getXEventAttacherManager(IForm form)
          Returns the OpenOffice.org XEventAttacherManager interface for the given form, or null if not available.
 boolean hasFormComponents()
          Returns if the component contains other form components.
 boolean hasForms()
          Returns if the component has forms.
 void removeFormComponent(IFormComponent formComponent)
          Removes the given form component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormService

public FormService(IDocument document,
                   com.sun.star.drawing.XDrawPage xDrawPage)
            throws java.lang.IllegalArgumentException
Constructs new FormService.

Parameters:
document - the document of the service
xDrawPage - the OpenOffice.org XDrawPage interface to be used
Throws:
java.lang.IllegalArgumentException - if the submitted document or the OpenOffice.org XFormsSupplier interface is not valid
Method Detail

getForms

public IForm[] getForms(java.lang.String formName)
                 throws NOAException
Returns the forms for the given form name as an array. There will be only more than one form if the given form name occurs more than once.

Specified by:
getForms in interface IFormService
Parameters:
formName - the form name to be used
Returns:
the forms for the given form name as an array
Throws:
NOAException - if the return of forms fails

getXEventAttacherManager

public com.sun.star.script.XEventAttacherManager getXEventAttacherManager(IForm form)
                                                                   throws NOAException
Returns the OpenOffice.org XEventAttacherManager interface for the given form, or null if not available.

Specified by:
getXEventAttacherManager in interface IFormService
Parameters:
form - the form to be used
Returns:
the OpenOffice.org XEventAttacherManager interface for the given form, or null
Throws:
NOAException - if the return of OpenOffice.org XEventAttacherManager interface fails

getIndexInForm

public int getIndexInForm(IForm form,
                          IFormComponent formComponent)
                   throws NOAException
Returns the index of the given form component in the given form, or -1 if not found.

Specified by:
getIndexInForm in interface IFormService
Parameters:
form - the form to check index in
formComponent - the form component to get index for
Returns:
the index of the given form component in the given form, or -1
Throws:
NOAException - if anything fails

hasForms

public boolean hasForms()
                 throws NOAException
Returns if the component has forms.

Specified by:
hasForms in interface IFormService
Returns:
if the component has forms
Throws:
NOAException - if the check fails

hasFormComponents

public boolean hasFormComponents()
                          throws NOAException
Returns if the component contains other form components.

Specified by:
hasFormComponents in interface IFormService
Returns:
if the component contains other form components
Throws:
NOAException - if the check fails

getFormComponents

public IFormComponent[] getFormComponents()
                                   throws NOAException
Returns all form components contained in this component.

Specified by:
getFormComponents in interface IFormService
Returns:
all form components contained in this component
Throws:
NOAException - if the return fails

getFormComponentsNames

public java.lang.String[] getFormComponentsNames()
                                          throws NOAException
Returns all form components names contained in this component.

Specified by:
getFormComponentsNames in interface IFormService
Returns:
all form components names contained in this component
Throws:
NOAException - if the return fails

removeFormComponent

public void removeFormComponent(IFormComponent formComponent)
                         throws NOAException
Removes the given form component.

Specified by:
removeFormComponent in interface IFormService
Parameters:
formComponent - the form component to remove
Throws:
NOAException - if the remove fails

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013