Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15
OOoRunner test harness

util
Class FormTools

java.lang.Object
  |
  +--util.FormTools

public class FormTools
extends Object

contains helper methods forms


Constructor Summary
FormTools()
           
 
Method Summary
static XLoadable bindForm(XTextDocument aDoc)
           
static XLoadable bindForm(XTextDocument aDoc, String formName)
           
static XLoadable bindForm(XTextDocument aDoc, String sourceName, String tableName)
          Binds 'Standard' form of aDoc Writer document to the tableName table of sourceName Data Source.
static XLoadable bindForm(XTextDocument aDoc, String formName, String sourceName, String tableName)
          Binds the form with the name specified of aDoc Writer document to the tableName table of sourceName Data Source.
static XInterface createControl(XComponent oDoc, String kind)
           
static XControlShape createControlShape(XComponent oDoc, int height, int width, int x, int y, String kind)
          creates a XControlShape
static XControlShape createControlShapeWithDefaultControl(XComponent oDoc, int height, int width, int x, int y, String kind)
           
static XControlShape createUnoControlShape(XComponent oDoc, int height, int width, int x, int y, String kind, String defControl)
           
static XNameContainer getForms(XDrawPage oDP)
           
static XControlShape insertControlShape(XComponent oDoc, int height, int width, int x, int y, String kind)
           
static void insertForm(XComponent aDoc, XNameContainer Forms, String aName)
           
static void switchDesignOf(XMultiServiceFactory xMSF, XTextDocument aDoc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormTools

public FormTools()
Method Detail

createControlShape

public static XControlShape createControlShape(XComponent oDoc,
                                               int height,
                                               int width,
                                               int x,
                                               int y,
                                               String kind)
creates a XControlShape
Parameters:
oDoc - the document
height - the height of the shape
width - the width of the shape
x - the x-position of the shape
y - the y-position of the shape
kind - the kind of the shape
Returns:
the created XControlShape

createUnoControlShape

public static XControlShape createUnoControlShape(XComponent oDoc,
                                                  int height,
                                                  int width,
                                                  int x,
                                                  int y,
                                                  String kind,
                                                  String defControl)

createControlShapeWithDefaultControl

public static XControlShape createControlShapeWithDefaultControl(XComponent oDoc,
                                                                 int height,
                                                                 int width,
                                                                 int x,
                                                                 int y,
                                                                 String kind)

createControl

public static XInterface createControl(XComponent oDoc,
                                       String kind)

getForms

public static XNameContainer getForms(XDrawPage oDP)

insertForm

public static void insertForm(XComponent aDoc,
                              XNameContainer Forms,
                              String aName)

insertControlShape

public static XControlShape insertControlShape(XComponent oDoc,
                                               int height,
                                               int width,
                                               int x,
                                               int y,
                                               String kind)

bindForm

public static XLoadable bindForm(XTextDocument aDoc)

bindForm

public static XLoadable bindForm(XTextDocument aDoc,
                                 String sourceName,
                                 String tableName)
                          throws Exception
Binds 'Standard' form of aDoc Writer document to the tableName table of sourceName Data Source.
Parameters:
aDoc - Writer document where DB controls are added.
sourceName - The name of DataSource in the DatabaseContext.
tableName - The name of the table to which controls are bound.
Returns:
com.sun.star.form.component.DatabaseForm service implementation which is the bound form inside the document.

bindForm

public static XLoadable bindForm(XTextDocument aDoc,
                                 String formName)

bindForm

public static XLoadable bindForm(XTextDocument aDoc,
                                 String formName,
                                 String sourceName,
                                 String tableName)
                          throws Exception
Binds the form with the name specified of aDoc Writer document to the tableName table of sourceName Data Source.
Parameters:
aDoc - Writer document where DB controls are added.
formName - The name of the form to be bound.
sourceName - The name of DataSource in the DatabaseContext.
tableName - The name of the table to which controls are bound.
Returns:
com.sun.star.form.component.DatabaseForm service implementation which is the bound form inside the document.

switchDesignOf

public static void switchDesignOf(XMultiServiceFactory xMSF,
                                  XTextDocument aDoc)

OOoRunner test harness

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.